Skip to content

Commit

Permalink
Delete some deadcode (setup_global_mocks)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinHock committed Apr 3, 2018
1 parent 36b9382 commit d33ff83
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions tests/util/mock_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,6 @@ def __new__(cls, expected_input, mocked_output, should_throw_exception=False):
)


def setup_global_mocks(obj, mocks=[]): # pragma: no cover
"""
Mocks out global objects, for general test cases.
:param obj: unittest.TestCase
:param mocks: mixed; either modules_to_mock_out :string, or
(modules_to_mock_out :string, autospec :boolean)
"""
for item in mocks:
autospec = True
if not isinstance(item, str) and len(item) > 1:
autospec = item[1]
item = item[0]

m = mock.patch(item, autospec=autospec)

obj.addCleanup(m.stop)
m.start()


def Any(cls):
"""Used to call assert_called_with with any argument.
Expand Down

0 comments on commit d33ff83

Please sign in to comment.