black it
This commit is contained in:
parent
558e3299fe
commit
28226f81a8
@ -872,17 +872,15 @@ class TestQueryset(unittest.TestCase):
|
||||
self.Person.objects.create(name="Foo", age=11)
|
||||
|
||||
bob = self.Person.objects.as_pymongo().first()
|
||||
assert 'age' in bob
|
||||
assert bob['age'] == 11
|
||||
assert "age" in bob
|
||||
assert bob["age"] == 11
|
||||
|
||||
self.Person.objects(name="Foo").update(
|
||||
rename__age='person_age'
|
||||
)
|
||||
self.Person.objects(name="Foo").update(rename__age="person_age")
|
||||
|
||||
bob = self.Person.objects.as_pymongo().first()
|
||||
assert 'age' not in bob
|
||||
assert 'person_age' in bob
|
||||
assert bob['person_age'] == 11
|
||||
assert "age" not in bob
|
||||
assert "person_age" in bob
|
||||
assert bob["person_age"] == 11
|
||||
|
||||
def test_save_and_only_on_fields_with_default(self):
|
||||
class Embed(EmbeddedDocument):
|
||||
|
Loading…
x
Reference in New Issue
Block a user