Ejemplo n.º 1
0
 def test_make_many_from_recipe(self):
     persons = mommy.make_many_from_recipe('test.generic.person')
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), mommy.MAX_MANY_QUANTITY)
     for person in persons:
         self.assertIsInstance(person, Person)
         self.assertNotEqual(person.id, None)
Ejemplo n.º 2
0
 def test_make_many_with_model_args(self):
     persons = mommy.make_many_from_recipe('model_mommy.person',
                                           name='Dennis Ritchie',
                                           age=70)
     for person in persons:
         self.assertEqual(person.name, 'Dennis Ritchie')
         self.assertEqual(person.age, 70)
Ejemplo n.º 3
0
 def test_make_many_from_recipe(self):
     persons = mommy.make_many_from_recipe('model_mommy.person')
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), mommy.MAX_MANY_QUANTITY)
     for person in persons:
         self.assertIsInstance(person, Person)
         self.assertNotEqual(person.id, None)
Ejemplo n.º 4
0
 def test_make_many_with_model_args(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     persons = mommy.make_many_from_recipe('test.generic.person', name='Dennis Ritchie', age=70)
     for person in persons:
         self.assertEqual(person.name, 'Dennis Ritchie')
         self.assertEqual(person.age, 70)
Ejemplo n.º 5
0
 def test_make_many_from_recipe_with_specified_quantity(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     quantity = 2
     persons = mommy.make_many_from_recipe('test.generic.person', quantity=quantity)
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), quantity)
Ejemplo n.º 6
0
 def test_make_many_with_model_args(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     persons = mommy.make_many_from_recipe('test.generic.person', name='Dennis Ritchie', age=70)
     for person in persons:
         self.assertEqual(person.name, 'Dennis Ritchie')
         self.assertEqual(person.age, 70)
Ejemplo n.º 7
0
 def test_make_many_from_recipe_with_specified_quantity(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     quantity = 2
     persons = mommy.make_many_from_recipe('test.generic.person', quantity=quantity)
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), quantity)
Ejemplo n.º 8
0
 def test_make_many_from_recipe(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     persons = mommy.make_many_from_recipe('test.generic.person')
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), mommy.MAX_MANY_QUANTITY)
     for person in persons:
         self.assertIsInstance(person, Person)
         self.assertNotEqual(person.id, None)
Ejemplo n.º 9
0
 def test_make_many_from_recipe(self):
     """
     make_many_from_recipe is deprecated, so this test must be deleted when
     the method is
     """
     persons = mommy.make_many_from_recipe('test.generic.person')
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), mommy.MAX_MANY_QUANTITY)
     for person in persons:
         self.assertIsInstance(person, Person)
         self.assertNotEqual(person.id, None)
Ejemplo n.º 10
0
 def test_make_many_with_model_args(self):
     persons = mommy.make_many_from_recipe('test.generic.person', name='Dennis Ritchie', age=70)
     for person in persons:
         self.assertEqual(person.name, 'Dennis Ritchie')
         self.assertEqual(person.age, 70)
Ejemplo n.º 11
0
 def test_make_many_from_recipe_with_specified_quantity(self):
     quantity = 2
     persons = mommy.make_many_from_recipe('test.generic.person', quantity=quantity)
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), quantity)
Ejemplo n.º 12
0
 def test_make_many_from_recipe_with_specified_quantity(self):
     quantity = 2
     persons = mommy.make_many_from_recipe('model_mommy.person',
                                           quantity=quantity)
     self.assertIsInstance(persons, list)
     self.assertEqual(len(persons), quantity)