Skip to content

Commit

Permalink
Fix mock paths in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed May 23, 2024
1 parent ccce1e7 commit 6bb80bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wagtail/contrib/frontend_cache/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_azure_front_door_get_client(self):
self.assertIs(client._config.credential, mock_credentials)

@mock.patch(
"wagtail.contrib.frontend_cache.backends.AzureCdnBackend._make_purge_call"
"wagtail.contrib.frontend_cache.backends.azure.AzureCdnBackend._make_purge_call"
)
def test_azure_cdn_purge(self, make_purge_call_mock):
backends = get_backends(
Expand Down Expand Up @@ -215,7 +215,7 @@ def test_azure_cdn_purge(self, make_purge_call_mock):
self.assertEqual(call_args[1], ["/home/events/christmas/?test=1", "/blog/"])

@mock.patch(
"wagtail.contrib.frontend_cache.backends.AzureFrontDoorBackend._make_purge_call"
"wagtail.contrib.frontend_cache.backends.azure.AzureFrontDoorBackend._make_purge_call"
)
def test_azure_front_door_purge(self, make_purge_call_mock):
backends = get_backends(
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_http_urlerror(self):
log_output.output[0],
)

@mock.patch("wagtail.contrib.frontend_cache.backends.urlopen")
@mock.patch("wagtail.contrib.frontend_cache.backends.http.urlopen")
def _test_http_with_side_effect(self, urlopen_mock, urlopen_side_effect):
# given a backends configuration with one HTTP backend
backends = get_backends(
Expand Down Expand Up @@ -668,7 +668,7 @@ def test_multiple_calls(self):
],
)

@mock.patch("wagtail.contrib.frontend_cache.backends.requests.delete")
@mock.patch("wagtail.contrib.frontend_cache.backends.cloudflare.requests.delete")
def test_http_error_on_cloudflare_purge_batch(self, requests_delete_mock):
backend_settings = {
"cloudflare": {
Expand Down

0 comments on commit 6bb80bf

Please sign in to comment.