def testCorrectNumberOfInstancesAreGenerated(self): """Tests if correct number of model instances are generated. """ count = 5 actual_list = seeder.seedn(count, Space) self.assertEqual(len(actual_list), count)
def seedn(self, count, model, properties, constraints=None, follow_fk=None, generate_fk=None, follow_m2m=None, factory=None, commit=True): """Generates and returns `count` number of instances of `model` with properties in `properties`. """ obj_list = seeder.seedn(count=count, model=model, constraints=constraints, follow_fk=follow_fk, generate_fk=generate_fk, follow_m2m=follow_m2m, factory=factory, model_properties=properties, commit=True) return obj_list