Skip to content

Commit

Permalink
Unittest for ExperienceView
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Dec 9, 2023
1 parent e840c55 commit a92052e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_offer/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,16 @@ def test_success_return_list_of_employment_type():
view = EmploymentTypeView.as_view({"get": "list"})
response = view(request)
assert response.status_code == 200
assert len(response.data) == 2
assert len(response.data) == 2


@pytest.mark.django_db
def test_success_return_list_of_experience():
Experience.objects.create(name='test_experience_1')
Experience.objects.create(name='test_experience_2')

request = factory.get('/offer/experience/')
view = ExperienceView.as_view({"get": "list"})
response = view(request)
assert response.status_code == 200
assert len(response.data) == 2

0 comments on commit a92052e

Please sign in to comment.