class Foo(models.Model): manager = SealableManager() as_manager = SealableQuerySet.as_manager()
class NonSealableClimate(models.Model): objects = SealableQuerySet.as_manager() class Meta: db_table = Climate._meta.db_table
def test_isinstance_manager(self): """Manager classes are subclasses of Manager as many third-party apps expect.""" self.assertIsInstance(SealableManager(), models.Manager) self.assertIsInstance(SealableQuerySet.as_manager(), models.Manager)