forked from extern/httpie-cli
Replace usage of mock with unittest.mock (#1054)
Since Python 3, the mock dependency is no more required as it is already part of the unittest module.
This commit is contained in:
parent
611bcdaab1
commit
1274d869f6
@ -1,4 +1,3 @@
|
|||||||
mock
|
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-httpbin>=0.0.6
|
pytest-httpbin>=0.0.6
|
||||||
|
1
setup.py
1
setup.py
@ -34,7 +34,6 @@ class PyTest(TestCommand):
|
|||||||
tests_require = [
|
tests_require = [
|
||||||
'pytest-httpbin',
|
'pytest-httpbin',
|
||||||
'pytest',
|
'pytest',
|
||||||
'mock',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"""HTTP authentication-related tests."""
|
"""HTTP authentication-related tests."""
|
||||||
import mock
|
from unittest import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from httpie.plugins.builtin import HTTPBasicAuth
|
from httpie.plugins.builtin import HTTPBasicAuth
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from mock import mock
|
from unittest import mock
|
||||||
|
|
||||||
from httpie.cli.constants import SEPARATOR_CREDENTIALS
|
from httpie.cli.constants import SEPARATOR_CREDENTIALS
|
||||||
from httpie.plugins import AuthPlugin
|
from httpie.plugins import AuthPlugin
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
from unittest import mock
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import mock
|
|
||||||
from requests.structures import CaseInsensitiveDict
|
from requests.structures import CaseInsensitiveDict
|
||||||
|
|
||||||
from httpie.downloads import (
|
from httpie.downloads import (
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import mock
|
from unittest import mock
|
||||||
from pytest import raises
|
from pytest import raises
|
||||||
from requests import Request
|
from requests import Request
|
||||||
from requests.exceptions import ConnectionError
|
from requests.exceptions import ConnectionError
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from httpie.status import ExitStatus
|
from httpie.status import ExitStatus
|
||||||
from utils import MockEnvironment, http, HTTP_OK
|
from utils import MockEnvironment, http, HTTP_OK
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -3,7 +3,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from mock import mock
|
from unittest import mock
|
||||||
from tempfile import gettempdir
|
from tempfile import gettempdir
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
Loading…
Reference in New Issue
Block a user