Commit afc43199 by brad

Re-register with parse server in test to Fix #91

The last 4 unit tests fail when run in series, but not if they were
run individually. The test for testCanGetCurrentUser registers the
service using the session token which loses the previous registration.
The other tests require that they are registered with the master_key,
so now the testCanGetCurrentUser test re-registers.
parent dd38bb02
...@@ -520,6 +520,13 @@ class TestUser(unittest.TestCase): ...@@ -520,6 +520,13 @@ class TestUser(unittest.TestCase):
) )
current_user = User.current_user() current_user = User.current_user()
register(
getattr(settings_local, 'APPLICATION_ID'),
getattr(settings_local, 'REST_API_KEY'),
master_key=getattr(settings_local, 'MASTER_KEY')
)
self.assertIsNotNone(current_user) self.assertIsNotNone(current_user)
self.assertEqual(current_user.sessionToken, user.sessionToken) self.assertEqual(current_user.sessionToken, user.sessionToken)
self.assertEqual(current_user.username, user.username) self.assertEqual(current_user.username, user.username)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment