def test_get_model_class_unknown_model(self): mc = LegacyGenericForeignKey.get_model_class('doesnotexistindb') self.assertEqual(mc, None)
def test_get_model_class_known_model(self): # use existing class mc = LegacyGenericForeignKey.get_model_class('subsystem') self.assertTrue(bool(mc))
def test_get_model_class_unknown_model(self): mc = LegacyGenericForeignKey.get_model_class('doesnotexistindb') assert mc is None