Пример #1
0
 def setUp(self):
     super().setUp()
     self.instance = FactoryFloor.MarineMammalFactory()
Пример #2
0
 def test_m2m_marine_mammal(self):
     # a `my_model` that is attached to a given `marine_mammals` should be accessible by the m2m field name `marine_mammals`
     marine_mammals = FactoryFloor.MarineMammalFactory()
     self.instance.marine_mammals.add(marine_mammals)
     self.assertEqual(self.instance.marine_mammals.count(), 1)
     self.assertIn(marine_mammals, self.instance.marine_mammals.all())