Fix ut to pass constantly
This commit is contained in:
parent
363aefe399
commit
56d9f7a8af
@ -4704,8 +4704,8 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
db_field='password_salt', required=True)
|
db_field='password_salt', required=True)
|
||||||
|
|
||||||
User.drop_collection()
|
User.drop_collection()
|
||||||
user = User(email="ross@example.com", password_salt="SomeSalt",
|
User(email="ross@example.com", password_salt="SomeSalt",
|
||||||
password_hash="SomeHash").save()
|
password_hash="SomeHash").save()
|
||||||
|
|
||||||
serialized_user = User.objects.exclude(
|
serialized_user = User.objects.exclude(
|
||||||
'password_salt', 'password_hash').as_pymongo()[0]
|
'password_salt', 'password_hash').as_pymongo()[0]
|
||||||
@ -4724,8 +4724,8 @@ class QuerySetTest(unittest.TestCase):
|
|||||||
self.assertEqual(set(['email']), set(serialized_user.keys()))
|
self.assertEqual(set(['email']), set(serialized_user.keys()))
|
||||||
|
|
||||||
serialized_user = User.objects.exclude(
|
serialized_user = User.objects.exclude(
|
||||||
'password_salt').only('email').to_json()
|
'password_salt', 'id').only('email').to_json()
|
||||||
self.assertEqual('[{"_id": {"$oid": "%s"}, "email": "ross@example.com"}]' % user.id,
|
self.assertEqual('[{"email": "ross@example.com"}]',
|
||||||
serialized_user)
|
serialized_user)
|
||||||
|
|
||||||
def test_only_after_count(self):
|
def test_only_after_count(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user