Skip to content

Commit

Permalink
fixed meeplib bug; forced meeplib reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Feb 16, 2012
1 parent f2e54c4 commit 98e7737
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meeplib.py
Expand Up @@ -47,7 +47,7 @@ def _get_next_message_id():

def _get_next_user_id():
if _users:
return max(_users.keys()) + 1
return max(_user_ids.keys()) + 1
return 0

def _reset():
Expand Down
3 changes: 2 additions & 1 deletion test_meeplib.py
Expand Up @@ -9,6 +9,7 @@

class TestMeepLib(unittest.TestCase):
def setUp(self):
meeplib._reset()
u = meeplib.User('foo', 'bar')
m = meeplib.Message('the title', 'the content', u)

Expand All @@ -24,7 +25,7 @@ def test_message_ownership(self):
u = x[0]

x = meeplib.get_all_messages()
assert len(x) == 1
assert len(x) == 1, x
m = x[0]

assert m.author == u
Expand Down

0 comments on commit 98e7737

Please sign in to comment.