refactor: switch from mock to unittest.mock (#34844)
As of Python 3.3, the 3rd-party `mock` package has been subsumed into the standard `unittest.mock` package. Refactoring tests to use the latter will allow us to drop `mock` as a dependency, which is currently coming in transitively through requirements/edx/paver.in. We don't actually drop the `mock` dependency in this PR. That will happen naturally in: * https://github.com/openedx/edx-platform/pull/34830
This commit is contained in:
@@ -3,8 +3,8 @@ Tests for the Salesforce API functionality
|
||||
"""
|
||||
import logging
|
||||
from contextlib import contextmanager
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
from simple_salesforce import SalesforceError
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Tests for the Segment API functionality
|
||||
"""
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import pytest
|
||||
import requests
|
||||
from six import text_type
|
||||
|
||||
Reference in New Issue
Block a user