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

Commit

Permalink
Fix regression in test fixture modifications; #406
Browse files Browse the repository at this point in the history
I modified the test fixture to setup data in the elsewhere column, but
it turns out we depend on lowercase for platform names, and the test
fixutre didn't use lowercase.
  • Loading branch information
chadwhitacre committed Dec 14, 2012
1 parent 7df34cf commit d864f08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gittip/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_accounts_elsewhere(self):
if account['platform'] == 'github':
github_account = account
else:
assert account['platform'] == 'twitter'
assert account['platform'] == 'twitter', account['platform']
twitter_account = account
return (github_account, twitter_account)

Expand Down
6 changes: 3 additions & 3 deletions gittip/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def start_payday(*data):
def setup_tips(*recs):
"""Setup some participants and tips. recs is a list of:
("tipper", "tippee", '2.00', True, False, True, "GitHub", "12345")
("tipper", "tippee", '2.00', True, False, True, "github", "12345")
^ ^ ^
| | |
| | -- claimed?
Expand All @@ -336,7 +336,7 @@ def setup_tips(*recs):

for rec in recs:
good_cc, is_suspicious, claimed, platform, user_id = \
(True, False, True, "GitHub", randid())
(True, False, True, "github", randid())

if len(rec) == 3:
tipper, tippee, amount = rec
Expand Down Expand Up @@ -366,7 +366,7 @@ def setup_tips(*recs):
continue
assert claimed in (True, False), claimed # refers to tippee
if tippee not in _participants:
_participants[tippee] = (None, False, claimed, "GitHub", randid())
_participants[tippee] = (None, False, claimed, "github", randid())
now = utcnow()
tips.append({ "ctime": now
, "mtime": now
Expand Down

0 comments on commit d864f08

Please sign in to comment.