Ejemplo n.º 1
0
def test_absence_type_list(auth_client):
    AbsenceTypeFactory.create_batch(2)

    url = reverse('absence-type-list')

    response = auth_client.get(url)
    assert response.status_code == status.HTTP_200_OK

    json = response.json()
    assert len(json['data']) == 2
Ejemplo n.º 2
0
    def setUp(self):
        """Set the environment for the tests up."""
        super().setUp()

        self.absence_types = AbsenceTypeFactory.create_batch(5)