Пример #1
0
 def test_get_model_class_unknown_model(self):
     mc = LegacyGenericForeignKey.get_model_class('doesnotexistindb')
     self.assertEqual(mc, None)
Пример #2
0
 def test_get_model_class_known_model(self):
     # use existing class
     mc = LegacyGenericForeignKey.get_model_class('subsystem')
     self.assertTrue(bool(mc))
Пример #3
0
 def test_get_model_class_unknown_model(self):
     mc = LegacyGenericForeignKey.get_model_class('doesnotexistindb')
     assert mc is None