Ensure that you can get a dbref of a document.
(self)
| 422 | assert MyDocument.objects.count() == 1 |
| 423 | |
| 424 | def test_to_dbref(self): |
| 425 | """Ensure that you can get a dbref of a document.""" |
| 426 | person = self.Person(name="Test User", age=30) |
| 427 | with pytest.raises(OperationError): |
| 428 | person.to_dbref() |
| 429 | person.save() |
| 430 | person.to_dbref() |
| 431 | |
| 432 | def test_key_like_attribute_access(self): |
| 433 | person = self.Person(age=30) |