예제 #1
0
파일: test.py 프로젝트: hmuntest/huxley
 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
예제 #2
0
 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
예제 #3
0
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
예제 #4
0
파일: test.py 프로젝트: m-j-mcdonald/huxley
    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
예제 #5
0
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