(self)
| 12 | |
| 13 | class TestDictField(MongoDBTestCase): |
| 14 | def test_storage(self): |
| 15 | class BlogPost(Document): |
| 16 | info = DictField() |
| 17 | |
| 18 | BlogPost.drop_collection() |
| 19 | |
| 20 | info = {"testkey": "testvalue"} |
| 21 | post = BlogPost(info=info).save() |
| 22 | assert get_as_pymongo(post) == {"_id": post.id, "info": info} |
| 23 | |
| 24 | def test_validate_invalid_type(self): |
| 25 | class BlogPost(Document): |
nothing calls this directly
no test coverage detected