Skip to content

Commit

Permalink
Mocking get_session_info function
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyMarsh committed Aug 28, 2024
1 parent 40fdbee commit f6defa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from pytest_django.asserts import assertTemplateUsed


def test_index(client, admin_client):
def test_index(client, admin_client, mocker):
"""Test the index view."""
mocker.patch("main.views.get_session_info")
with assertTemplateUsed(template_name="main/index.html"):
response = client.get("/")
assert response.status_code == 200
Expand Down

0 comments on commit f6defa4

Please sign in to comment.