Skip to content

Commit

Permalink
update tied rank unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nphilipp committed Nov 11, 2013
1 parent c042ce5 commit 6d00668
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ def test_ranking_tie(self):
self.api.add_assertion(self.badge_id_2, self.email_4, None)
self.api.add_assertion(self.badge_id_3, self.email_4, None)

person1 = self.api.get_person("test_1@tester.com")
person2 = self.api.get_person("test_2@tester.com")
person3 = self.api.get_person("test_3@tester.com")
person4 = self.api.get_person("test_4@tester.com")

assert_in(person2.rank, (2, 3))
assert_in(person3.rank, (2, 3))
eq_(person1.rank, 4)
eq_(person2.rank, 2)
eq_(person3.rank, 2)
eq_(person4.rank, 1)

def test_ranking_preexisting(self):
""" Test that rank updating works for pre-existant users """
Expand Down

0 comments on commit 6d00668

Please sign in to comment.