| 330 | """Ensure that documents may be created with custom primary keys.""" |
| 331 | |
| 332 | class User(Document): |
| 333 | username = StringField(primary_key=True) |
| 334 | name = StringField() |
| 335 | |
| 336 | meta = {"allow_inheritance": True} |
| 337 | |
| 338 | User.drop_collection() |
| 339 |