Esempio n. 1
0
    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)
Esempio n. 2
0
    def setUp(self):
        user = ModelFactory.create_user()
        participants = [user]
        bitbyteactivity = ModelFactory.create_bitbyteactivity_activity(
            participants)

        self.user = user
        self.participants = participants
        self.bitbyteactivity = bitbyteactivity