Skip to content

Commit

Permalink
[fix] Updated TestRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy committed Feb 2, 2024
1 parent c8a8167 commit 7995cee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openwisp_utils/measurements/tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import requests
from django.test.runner import DiscoverRunner
from openwisp_utils.measurements import tasks
from openwisp_utils import utils

success_response = requests.Response()
success_response.status_code = 204
Expand All @@ -15,5 +15,5 @@ class MockRequestPostRunner(DiscoverRunner):
"""

def setup_databases(self, **kwargs):
tasks.requests.post = MagicMock(return_value=success_response)
utils.requests.post = MagicMock(return_value=success_response)
return super().setup_databases(**kwargs)

0 comments on commit 7995cee

Please sign in to comment.