def test_creating_person_from_factory_using_paramters(self): from model_mommy.mommy import Mommy from model_mommy.models import Person person_mom = Mommy(Person) person = person_mom.make_one(happy=False, age=20, gender='M', name='John') self.assertEqual(person.age, 20) self.assertEqual(person.happy, False) self.assertEqual(person.name, 'John') self.assertEqual(person.gender, 'M')
def exist_a_project(step): for project_hashes in step.hashes: mom = Mommy(Project, False) project = mom.make_one(name=project_hashes.get('name'))
def exist_a_news(step): for news_hashes in step.hashes: mom = Mommy(News, False) news = mom.make_one(title=news_hashes.get('title'), summary=news_hashes.get('summary'))
def exist_a_tool(step): for tool_hashes in step.hashes: mom = Mommy(Tool, False) tool = mom.make_one(name=tool_hashes.get('name'), highlight=tool_hashes.get('highlight'))
def exist_a_project(step): for project_hashes in step.hashes: mom = Mommy(Project, False) project = mom.make_one(name=project_hashes.get('name'), status=project_hashes.get('status'))