def setUp(self): user = ModelFactory.create_user() participants = [user] bitbyteactivity = ModelFactory.create_bitbyteactivity_activity( participants) self.user = user self.participants = participants self.bitbyteactivity = bitbyteactivity
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) duepayment = ModelFactory.create_duepayment_requirement( candidateSemesterActive=semester, ) self.semester = semester self.duepayment = duepayment
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) mandatory_requirement = ModelFactory.create_mandatory_requirement( candidateSemesterActive=semester, ) self.semester = semester self.mandatory_requirement = mandatory_requirement
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) bitbyteactivity_requirement = ModelFactory.create_bitbyteactivity_requirement( candidateSemesterActive=semester, ) self.semester = semester self.bitbyteactivity_requirement = bitbyteactivity_requirement
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) committeeproject = ModelFactory.create_committeeproject_requirement( candidateSemesterActive=semester, ) self.semester = semester self.committeeproject = committeeproject
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) hangout_requirement = ModelFactory.create_hangout_requirement( candidateSemesterActive=semester, ) self.semester = semester self.hangout_requirement = hangout_requirement
def setUp(self): semester = ModelFactory.create_semester( semester="Spring", year=0, ) candidateform = ModelFactory.create_candidateform_requirement( candidateSemesterActive=semester, ) self.semester = semester self.candidateform = candidateform
def setUp(self): event_type = ModelFactory.create_eventtype(type="custom event type") semester = ModelFactory.create_semester( semester="Spring", year=0, ) event_requirement = ModelFactory.create_event_requirement( eventType=event_type, candidateSemesterActive=semester, enableTitle=True, ) self.event_type = event_type self.semester = semester self.event_requirement = event_requirement
def setUp(self): requester = ModelFactory.create_user(username="******") officer = ModelFactory.create_user(username="******") group = Group(name="officer") group.save() group.user_set.add(officer) group.save() officer_challenge = ModelFactory.create_officerchallenge_activity( requester, officer) self.requester = requester self.officer = officer self.officer_challenge = officer_challenge
def test_checkoff_req_post_returns_200(self): self.client.login(username=self.officer.username, password=self.password) logistics = ModelFactory.create_default_logistics() misc_req = ModelFactory.create_misc_req() logistics.misc_reqs.add(misc_req) logistics.save() data = { "logistics_id": logistics.id, "type": "misc_req", "obj_title": misc_req.title, "user_id": self.candidate.id, "operation": "0", } response = self.client.post(reverse("candidate:checkoff_req"), data=data) self.client.logout() self.assertEqual(response.status_code, 200)
def test_officer_portal_with_logistics_get_returns_200(self): self.client.login(username=self.officer.username, password=self.password) ModelFactory.create_bitbyteactivity_activity([self.candidate]) ModelFactory.create_officerchallenge_activity(self.candidate, self.officer) logistics = ModelFactory.create_default_logistics() logistics.misc_reqs.add(ModelFactory.create_misc_req()) logistics.save() response = self.client.get(reverse("candidate:officer_portal")) self.client.logout() self.assertEqual(response.status_code, 200)
def setUp(self): announcement = ModelFactory.create_announcement() self.announcement = announcement
def setUp(self): logistics = ModelFactory.create_default_logistics() self.logistics = logistics
def test_str(self): str(ModelFactory.create_default_event_req()) str(ModelFactory.create_form_req()) str(ModelFactory.create_misc_req())
def test_populate(self): self.logistics.populate( ModelFactory.create_user(username="******"))