mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 01:03:27 +01:00
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-cov
|
||||
pytest-httpbin>=0.0.6
|
||||
|
1
setup.py
1
setup.py
@ -34,7 +34,6 @@ class PyTest(TestCommand):
|
||||
tests_require = [
|
||||
'pytest-httpbin',
|
||||
'pytest',
|
||||
'mock',
|
||||
]
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
"""HTTP authentication-related tests."""
|
||||
import mock
|
||||
from unittest import mock
|
||||
import pytest
|
||||
|
||||
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.plugins import AuthPlugin
|
||||
|
@ -1,10 +1,10 @@
|
||||
import os
|
||||
import tempfile
|
||||
import time
|
||||
from unittest import mock
|
||||
from urllib.request import urlopen
|
||||
|
||||
import pytest
|
||||
import mock
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
from httpie.downloads import (
|
||||
|
@ -1,4 +1,4 @@
|
||||
import mock
|
||||
from unittest import mock
|
||||
from pytest import raises
|
||||
from requests import Request
|
||||
from requests.exceptions import ConnectionError
|
||||
|
@ -1,4 +1,4 @@
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from httpie.status import ExitStatus
|
||||
from utils import MockEnvironment, http, HTTP_OK
|
||||
|
@ -1,7 +1,7 @@
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import json
|
||||
import os
|
||||
import tempfile
|
||||
|
@ -3,7 +3,7 @@ import json
|
||||
import os
|
||||
import shutil
|
||||
from datetime import datetime
|
||||
from mock import mock
|
||||
from unittest import mock
|
||||
from tempfile import gettempdir
|
||||
|
||||
import pytest
|
||||
|
Loading…
Reference in New Issue
Block a user