(self)
| 2245 | assert Animal.objects(_cls__in=["Animal.Fish.Guppy"]).count() == 0 |
| 2246 | |
| 2247 | def test_sparse_field(self): |
| 2248 | class Doc(Document): |
| 2249 | name = StringField(required=False, unique=True, sparse=True) |
| 2250 | |
| 2251 | # This would raise an exception in a non-sparse unique index |
| 2252 | Doc().save() |
| 2253 | Doc().save() |
| 2254 | |
| 2255 | def test_undefined_field_exception(self): |
| 2256 | """Tests if a `FieldDoesNotExist` exception is raised when |