(self)
| 60 | assert expected == actual |
| 61 | |
| 62 | def test_save_none(self): |
| 63 | class Person(Document): |
| 64 | value = DecimalField() |
| 65 | |
| 66 | Person.drop_collection() |
| 67 | |
| 68 | person = Person(value=None) |
| 69 | assert person.value is None |
| 70 | person.save() |
| 71 | fetched_person = Person.objects.first() |
| 72 | fetched_person.value is None |
| 73 | |
| 74 | assert Person.objects(value=None).first() is not None |
| 75 | |
| 76 | def test_validation(self): |
| 77 | """Ensure that invalid values cannot be assigned to decimal fields.""" |
nothing calls this directly
no test coverage detected