def new_delegate(**kwargs): a = TestAssignments.new_assignment() c = Delegate( assignment=kwargs.pop('assignment', a), name=kwargs.pop('name', 'Nate Parke'), email=kwargs.pop('email', '*****@*****.**'), summary=kwargs.pop('summary', 'He did well!'),) c.save() return c
def new_delegate(**kwargs): a = TestAssignments.new_assignment() c = Delegate( assignment=kwargs.pop('assignment', a), name=kwargs.pop('name', 'Nate Parke'), email=kwargs.pop('email', '*****@*****.**'), summary=kwargs.pop('summary', 'He did well!'), ) c.save() return c
def new_delegate(**kwargs): a = kwargs.pop('assignment', None) or new_assignment() s = kwargs.pop('school', None) or a.school d = Delegate( assignment=a, school=s, name=kwargs.pop('name', 'Nate Parke'), email=kwargs.pop('email', '*****@*****.**'), summary=kwargs.pop('summary', 'He did well!'),) d.save() return d
def new_delegate(**kwargs): a = kwargs.pop("assignment", None) or TestAssignments.new_assignment() s = kwargs.pop("school", None) or a.school or TestSchools.new_school() c = Delegate( assignment=a, school=s, name=kwargs.pop("name", "Nate Parke"), email=kwargs.pop("email", "*****@*****.**"), summary=kwargs.pop("summary", "He did well!"), ) c.save() return c
def new_delegate(**kwargs): a = kwargs.pop('assignment', None) or new_assignment() s = kwargs.pop('school', None) or a.school d = Delegate( assignment=a, school=s, name=kwargs.pop('name', 'Nate Parke'), email=kwargs.pop('email', '*****@*****.**'), summary=kwargs.pop('summary', 'He did well!'), ) d.save() return d