Skip to content

Commit ae6a432

Browse files
committed
Move http module in imports and mock patches
1 parent cf62121 commit ae6a432

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/protocols/http/core/test_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
class GvmHttpApiTestCase(unittest.TestCase):
1212
# pylint: disable=protected-access
1313

14-
@patch("gvm.http.core.connector.HttpApiConnector")
14+
@patch("gvm.protocols.http.core.connector.HttpApiConnector")
1515
def test_basic_init(self, connector_mock: MagicMock):
1616
api = GvmHttpApi(connector_mock)
1717
self.assertEqual(connector_mock, api._connector)
1818

19-
@patch("gvm.http.core.connector.HttpApiConnector")
19+
@patch("gvm.protocols.http.core.connector.HttpApiConnector")
2020
def test_init_with_key(self, connector_mock: MagicMock):
2121
api = GvmHttpApi(connector_mock, api_key="my-api-key")
2222
self.assertEqual(connector_mock, api._connector)

tests/protocols/http/core/test_connector.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from httpx import HTTPError
1313

1414
from gvm.protocols.http.core.connector import HttpApiConnector
15-
from gvm.protocols.http.core import ContentType
15+
from gvm.protocols.http.core.headers import ContentType
1616

1717
TEST_JSON_HEADERS = {
1818
"content-type": "application/json;charset=utf-8",

tests/protocols/http/core/test_headers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import unittest
66

7-
from gvm.protocols.http.core import ContentType
7+
from gvm.protocols.http.core.headers import ContentType
88

99

1010
class ContentTypeTestCase(unittest.TestCase):

0 commit comments

Comments
 (0)