def test_mongomanager_instances_on_not_document_subclasses_are_ignored(self):
        from catalog.mongomodels import _managers_autodiscover
        mod = self._makeCase3()

        self.assertEqual(_managers_autodiscover(base=mod), [])
    def test_list_elements_are_mongomanager_instances(self):
        from catalog.mongomodels import _managers_autodiscover, MongoManager
        mod = self._makeCase1()

        self.assertTrue(isinstance(_managers_autodiscover(base=mod)[0],
            MongoManager))
    def test_instances_different_than_mongomanager_are_ignored(self):
        from catalog.mongomodels import _managers_autodiscover
        mod = self._makeCase2()

        self.assertEqual(_managers_autodiscover(base=mod), [])
    def test_mongomanager_instances_on_document_subclasses_are_identified(self):
        from catalog.mongomodels import _managers_autodiscover
        mod = self._makeCase1()

        self.assertEqual(_managers_autodiscover(base=mod), [mod.Foo.objects])