Skip to content

Commit 92bb6a3

Browse files
committed
[chores] Fixed test_vpn for 1.2 branch
1 parent 33706ab commit 92bb6a3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

openwisp_controller/config/tests/test_vpn.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
from subprocess import CalledProcessError, TimeoutExpired
44
from unittest import mock
55

6+
import requests
67
from celery.exceptions import Retry, SoftTimeLimitExceeded
78
from django.conf import settings
89
from django.core.exceptions import ValidationError
910
from django.db.models.signals import post_save
1011
from django.db.utils import IntegrityError
11-
from django.http.response import HttpResponse, HttpResponseNotFound
12+
from django.http.response import HttpResponse
1213
from django.test import TestCase, TransactionTestCase
1314
from requests.exceptions import ConnectionError, RequestException, Timeout
1415
from swapper import load_model
@@ -855,7 +856,7 @@ def test_update_vpn_server_configuration(self):
855856
fail_response.raise_for_status.side_effect = requests.exceptions.HTTPError(
856857
"Not Found"
857858
)
858-
with mock.patch("logging.Logger.warning") as mocked_logger, mock.patch(
859+
with mock.patch("logging.Logger.error") as mocked_logger, mock.patch(
859860
"requests.post", return_value=fail_response
860861
):
861862
post_save.send(

0 commit comments

Comments
 (0)