def setUp(self): u = User.objects.create_user("testuser_getnexttask", "*****@*****.**", "abc") u.full_clean() u.save() g = Group(name="test group") g.full_clean() g.save() u.groups.add(g) u.full_clean() u.save() p = Project( admin=u, title="Test Project", description="Testing project.", type="simple", annotator_count=1, priority=3, ) p.full_clean() p.save() p.annotators.add(g) p.full_clean() p.save() t = SimpleTask(question="test question", project=p) t.full_clean() t.save() self.t = t self.user = u
def setUp(self): u = User.objects.create_user("testuser_getnexttask", "*****@*****.**", "abc") u.full_clean() u.save() g = Group(name="test group") g.full_clean() g.save() u.groups.add(g) u.full_clean() u.save() p = Project( admin=u, title="Test Project", description="Testing project.", type="simple", annotator_count=1, priority=3 ) p.full_clean() p.save() p.annotators.add(g) p.full_clean() p.save() t = SimpleTask(question="test question", project=p) t.full_clean() t.save() self.t = t self.user = u
def setUp(self): u = User.objects.create_user("testuser_getnexttask", "*****@*****.**", "abc") u.full_clean() u.save() g = Group(name="test group") g.full_clean() g.save() u.groups.add(g) u.full_clean() u.save() p = SimpleProject( admin=u, title="Test Project", description="Testing project.", type="simple", annotator_count=1, priority=3, ) p.full_clean() p.save() p.annotators.add(g) p.full_clean() p.save() t = SimpleTask(question="test question", project=p) t.full_clean() t.save() r = SimpleResponse( task=t, answer="test answer", comment="test comment", start_time=datetime.datetime(2000, 1, 1), user=u, ) r.full_clean() r.save() t.completed_assignments = 1 t.completed = True t.full_clean() t.save() self.t = t self.user = u self.p = p
def setUp(self): u = User.objects.create_user("testuser_getnexttask", "*****@*****.**", "abc") u.full_clean() u.save() g = Group(name="test group") g.full_clean() g.save() u.groups.add(g) u.full_clean() u.save() p = SimpleProject( admin=u, title="Test Project", description="Testing project.", type="simple", annotator_count=1, priority=3 ) p.full_clean() p.save() p.annotators.add(g) p.full_clean() p.save() t = SimpleTask(question="test question", project=p) t.full_clean() t.save() r = SimpleResponse( task=t, answer="test answer", comment="test comment", start_time=datetime.datetime(2000, 1, 1), user=u ) r.full_clean() r.save() t.completed_assignments = 1 t.completed = True t.full_clean() t.save() self.t = t self.user = u self.p = p