def create_test_basic_unit(self, course, unittype='n', start=None, deadline=None, weight=None): test_unit = Unit(title='test_basic_unit', course=course, unittype=unittype) if start: test_unit.start = start if deadline: test_unit.deadline = deadline if weight: test_unit.weight = weight test_unit.save() return test_unit
def create_test_basic_unit(self, course, unittype='n'): test_unit = Unit(title='test_basic_unit', course=course, unittype=unittype) test_unit.save() return test_unit