Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Dec 19, 2014
1 parent 2d7dfc8 commit 4869372
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions tests/py/test_goal_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ def test_participant_can_set_their_goal_to_null(self):

def test_participant_can_set_their_goal_to_zero(self):
response = self.change_goal("0")
actual = json.loads(response.body)['goal']
assert actual == "0"
actual = json.loads(response.body)['goal_l']
assert actual == "$0"

def test_participant_can_set_their_goal_to_a_custom_amount(self):
response = self.change_goal("custom", "100.00")
actual = json.loads(response.body)['goal']
assert actual == "100"
actual = json.loads(response.body)['goal_l']
assert actual == "$100"

def test_custom_amounts_can_include_comma(self):
response = self.change_goal("custom", "1,100.00")
actual = json.loads(response.body)['goal']
assert actual == "1,100"
actual = json.loads(response.body)['goal_l']
assert actual == "$1,100"

def test_wonky_custom_amounts_are_standardized(self):
response = self.change_goal("custom", ",100,100.00000")
actual = json.loads(response.body)['goal']
assert actual == "100,100"
actual = json.loads(response.body)['goal_l']
assert actual == "$100,100"

def test_anonymous_gets_404(self):
response = self.change_goal("100.00", auth_as=None, expecting_error=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/py/test_statement_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def change_statement(self, lang, statement, auth_as='alice',

def test_participant_can_change_their_statement(self):
response = self.change_statement('en', 'Lorem ipsum')
actual = json.loads(response.body)['content']
actual = json.loads(response.body)['html']
assert actual == '<p>Lorem ipsum</p>\n'

def test_anonymous_gets_403(self):
Expand Down

0 comments on commit 4869372

Please sign in to comment.