Skip to content

Commit 7886377

Browse files
committed
test(views): add test_get spec
1 parent fb64adc commit 7886377

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/pytest/core/test_views.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def test_agency_eligibility_index(client, model_TransitAgency, mocked_session_up
166166
assert mocked_session_update.mock_calls[0].kwargs["origin"] == model_TransitAgency.index_url
167167

168168

169+
@pytest.mark.django_db
169170
class TestHelpView:
170171
@pytest.fixture
171172
def view(self, app_request):
@@ -176,6 +177,13 @@ def view(self, app_request):
176177
def test_view(self, view):
177178
assert view.template_name == "core/help.html"
178179

180+
def test_get(self, mocker, view, app_request):
181+
spy = mocker.spy(view, "get")
182+
response = view.dispatch(app_request)
183+
184+
spy.assert_called_once()
185+
assert response.status_code == 200
186+
179187

180188
@pytest.mark.django_db
181189
@pytest.mark.usefixtures("mocked_session_agency")

0 commit comments

Comments
 (0)