Skip to content

Commit

Permalink
test: mock is now a build in Python module
Browse files Browse the repository at this point in the history
Since Python 3.3 mock is now also provided by unittest so a dependency
on mock is no longer required.
  • Loading branch information
jelly committed Nov 7, 2023
1 parent 668d829 commit ffcc20d
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 18 deletions.
1 change: 0 additions & 1 deletion dev-requirements.txt
Expand Up @@ -10,7 +10,6 @@ wheel
twine
pyflakes
pycodestyle
mock
ipaddress>=1.0.16
geoip
readme_renderer
1 change: 0 additions & 1 deletion doc-requirements.txt
Expand Up @@ -15,7 +15,6 @@ wheel
twine
pyflakes
pycodestyle
mock
ipaddress>=1.0.16
geoip
readme_renderer
2 changes: 1 addition & 1 deletion test/py3_test_controller.py
@@ -1,4 +1,4 @@
from mock import Mock
from unittest.mock import Mock

from twisted.trial import unittest
from twisted.internet.defer import ensureDeferred
Expand Down
2 changes: 1 addition & 1 deletion test/test_attacher.py
@@ -1,4 +1,4 @@
from mock import Mock
from unittest.mock import Mock
from zope.interface import directlyProvides

from twisted.trial import unittest
Expand Down
4 changes: 2 additions & 2 deletions test/test_circuit.py
@@ -1,6 +1,6 @@
import datetime
import ipaddress
from mock import patch
from unittest.mock import patch

from twisted.trial import unittest
from twisted.internet import defer
Expand All @@ -21,7 +21,7 @@
from txtorcon.interface import CircuitListenerMixin
from txtorcon.interface import ITorControlProtocol

from mock import Mock
from unittest.mock import Mock


@implementer(IRouterContainer)
Expand Down
2 changes: 1 addition & 1 deletion test/test_controller.py
Expand Up @@ -2,7 +2,7 @@
import six
import functools
from os.path import join
from mock import Mock, patch
from unittest.mock import Mock, patch
from io import BytesIO

from twisted.internet.interfaces import IReactorCore
Expand Down
4 changes: 2 additions & 2 deletions test/test_endpoints.py
Expand Up @@ -2,8 +2,8 @@

import os
import sys
from mock import patch
from mock import Mock, MagicMock
from unittest.mock import patch
from unittest.mock import Mock, MagicMock
from unittest import skipIf
from binascii import b2a_base64

Expand Down
2 changes: 1 addition & 1 deletion test/test_onion.py
Expand Up @@ -2,7 +2,7 @@

import os
import sys
from mock import Mock
from unittest.mock import Mock
from os.path import join
from unittest import skipIf

Expand Down
2 changes: 1 addition & 1 deletion test/test_router.py
@@ -1,6 +1,6 @@
import json
from datetime import datetime
from mock import Mock
from unittest.mock import Mock

from twisted.trial import unittest
from twisted.internet import defer
Expand Down
2 changes: 1 addition & 1 deletion test/test_socks.py
@@ -1,5 +1,5 @@
from six import BytesIO, text_type
from mock import Mock, patch
from unittest.mock import Mock, patch

from twisted.trial import unittest
from twisted.internet import defer
Expand Down
2 changes: 1 addition & 1 deletion test/test_torconfig.py
Expand Up @@ -6,7 +6,7 @@
import functools
import warnings
from six import StringIO
from mock import Mock, patch
from unittest.mock import Mock, patch
from os.path import join

from zope.interface import implementer, directlyProvides
Expand Down
2 changes: 1 addition & 1 deletion test/test_torstate.py
Expand Up @@ -12,7 +12,7 @@

from ipaddress import IPv4Address

from mock import patch, Mock
from unittest.mock import patch, Mock

from txtorcon import TorControlProtocol
from txtorcon import TorProtocolError
Expand Down
2 changes: 1 addition & 1 deletion test/test_util.py
@@ -1,7 +1,7 @@
import os
import tempfile
import ipaddress
from mock import patch
from unittest.mock import patch
from unittest import skip as _skip
from os.path import exists

Expand Down
2 changes: 1 addition & 1 deletion test/test_web.py
@@ -1,5 +1,5 @@

from mock import Mock
from unittest.mock import Mock

from twisted.web.client import BrowserLikePolicyForHTTPS
from twisted.trial import unittest
Expand Down
2 changes: 1 addition & 1 deletion test3/test_controller.py
Expand Up @@ -2,7 +2,7 @@

import six
import unittest
from mock import Mock, patch
from unittest.mock import Mock, patch

from zope.interface import directlyProvides

Expand Down
1 change: 0 additions & 1 deletion tox.ini
Expand Up @@ -33,7 +33,6 @@ deps=
zope.interface>=3.6.1
setuptools>=0.8.0
automat
mock
## XXX this doesn't work on github-actions
## GeoIP
coverage
Expand Down

0 comments on commit ffcc20d

Please sign in to comment.