Skip to content

Commit

Permalink
feat: cache is cleared between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-hd committed Oct 16, 2024
1 parent c183a3f commit ca7befe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/functional/test_native_land_data_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from unittest.mock import patch

from django.urls import reverse
from django.core.cache import cache
from django.contrib.auth.models import User
from django.test import Client, TransactionTestCase

Expand All @@ -21,6 +22,9 @@ def setUp(self):
)
self.assertTrue(logged_in, 'Login failed')

# clear cache since view function modifies the cache
cache.clear()

def test_error_raised_when_slug_is_not_defined_in_get_request(self):
"""
When the get request does not contain a slug, it should raise an error.
Expand Down

0 comments on commit ca7befe

Please sign in to comment.