def test_team_multiple_registration1(self): self.get_test_client({"id": "student1", "api_key": "student1"}) course = self.FIXTURE["courses"]["cmsc40100"] assignment1 = course["assignments"]["pa1"] assignment2 = course["assignments"]["pa2"] a1 = Assignment.from_id(course["id"], assignment1["id"]) self.assertEquals(a1.name, assignment1["name"]) a2 = Assignment.from_id(course["id"], assignment2["id"]) self.assertEquals(a2.name, assignment2["name"]) r1 = a1.register(partners=["student2"]) r2 = a2.register(partners=["student2"])
def test_create_assignment(self): self.get_test_client({"id": "admin", "api_key": "admin"}) assignment = Assignment(id="pa1", name="Programming Assignment 1", deadline="2042-01-21T20:00", course_id="cmsc40100")
def instructor_assignment_add(ctx, course, assignment_id, name, deadline): deadline = convert_datetime_to_utc(deadline) assignment = Assignment(id = assignment_id, name = name, deadline = deadline, course_id = course.id) return CHISUBMIT_SUCCESS
def test_single_registration1(self): self.get_test_client({"id": "student1", "api_key": "student1"}) course = self.FIXTURE["courses"]["cmsc40100"] assignment = course["assignments"]["pa1"] a = Assignment.from_id(course["id"], assignment["id"]) self.assertEquals(a.name, assignment["name"]) r = a.register(partners=["student2", "student3"])
def test_get_assignment(self): self.get_test_client({"id": "student1", "api_key": "student1"}) assignment = Assignment.from_id("cmsc40100", "pa1")
def test_get_assignments(self): self.get_test_client({"id": "student1", "api_key": "student1"}) assignments = Assignment.all("cmsc40100")
def get_assignment(self, assignment_id): return Assignment.from_id(self.id, assignment_id)