Skip to content
Snippets Groups Projects
Commit 438a21c8 authored by David Baker's avatar David Baker
Browse files

Don't test exact equality of the list: as long as it has the fields we expect,...

Don't test exact equality of the list: as long as it has the fields we expect, that's just fine. I added the user_id (as in database pkey) and it broke: no point testing what that comes out as: it's determined by the db.
parent 9aa0224c
No related branches found
No related tags found
No related merge requests found
......@@ -38,13 +38,12 @@ class RegistrationStoreTestCase(unittest.TestCase):
@defer.inlineCallbacks
def test_register(self):
yield self.store.register(self.user_id, self.tokens[0], self.pwhash)
u = yield self.store.get_user_by_id(self.user_id)[0]
self.assertEquals(
# TODO(paul): Surely this field should be 'user_id', not 'name'
# Additionally surely it shouldn't come in a 1-element list
[{"name": self.user_id, "password_hash": self.pwhash}],
(yield self.store.get_user_by_id(self.user_id))
)
# TODO(paul): Surely this field should be 'user_id', not 'name'
# Additionally surely it shouldn't come in a 1-element list
self.assertEquals(self.user_id, u['name'])
self.assertEquals(self.pwhash, u['password_hash'])
self.assertEquals(
{"admin": 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment