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