Skip to content

Commit b55756f

Browse files
Remove use of external mock module (#162)
Python since 3.4 has included mock in the standard library, under the unittest module. Since the lowest version supported is greater than that, we can switch to using it and drop one external requirement.
1 parent 3cb10ab commit b55756f

File tree

20 files changed

+19
-20
lines changed

20 files changed

+19
-20
lines changed

requirements/test.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
flake8==3.6.0
44
isort==4.3.4
5-
mock==2.0.0
65
pytest
76
tox==3.23.1
87
black==21.7b0

tests/unit/actions/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mock
1+
from unittest import mock
22
import pytest
33

44
from hcloud.actions.client import ActionsClient, BoundAction

tests/unit/certificates/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
import mock
2+
from unittest import mock
33

44
from hcloud.actions.client import BoundAction
55
from hcloud.certificates.client import CertificatesClient, BoundCertificate

tests/unit/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mock
1+
from unittest import mock
22
import pytest
33
from hcloud import Client
44

tests/unit/core/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mock
1+
from unittest import mock
22
import pytest
33

44
from hcloud.core.client import BoundModelBase, ClientEntityBase, GetEntityByNameMixin

tests/unit/datacenters/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest # noqa: F401
2-
import mock # noqa: F401
2+
from unittest import mock # noqa: F401
33

44
from hcloud.datacenters.client import DatacentersClient, BoundDatacenter
55
from hcloud.datacenters.domain import DatacenterServerTypes

tests/unit/firewalls/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
import mock
2+
from unittest import mock
33

44
from hcloud.firewalls.client import FirewallsClient, BoundFirewall
55
from hcloud.actions.client import BoundAction

tests/unit/floating_ips/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
import mock
2+
from unittest import mock
33

44
from hcloud.actions.client import BoundAction
55
from hcloud.servers.client import BoundServer

tests/unit/images/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
import mock
2+
from unittest import mock
33
import datetime
44
from dateutil.tz import tzoffset
55

tests/unit/isos/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import pytest
2-
import mock
2+
from unittest import mock
33
import datetime
44
from dateutil.tz import tzoffset
55

0 commit comments

Comments
 (0)