Skip to content

Commit 66d02eb

Browse files
author
Mathieu
committed
tests: use mock from pypi
1 parent 49ecabf commit 66d02eb

File tree

4 files changed

+4
-966
lines changed

4 files changed

+4
-966
lines changed

tests/base.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,13 @@
66

77
import httplib2
88

9-
from . import mock
9+
import mock
1010

1111
import shotgun_api3 as api
1212
from shotgun_api3.shotgun import json
1313
from shotgun_api3.shotgun import ServerCapabilities
1414
import urllib.error
1515

16-
try:
17-
# Attempt to import skip from unittest. Since this was added in Python 2.7
18-
# in the case that we're running on Python 2.6 we'll need a decorator to
19-
# provide some equivalent functionality.
20-
from unittest import skip
21-
except ImportError:
22-
# On Python 2.6 we'll just have to ignore tests that are skipped -- we won't
23-
# mark them as skipped, but we will not fail on them.
24-
def skip(f):
25-
return lambda self: None
26-
2716

2817
class TestBase(unittest.TestCase):
2918
'''Base class for tests.

tests/ci_requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ flake8
1818
pytest
1919
pytest-azurepipelines
2020
coverage
21-
pytest-coverage
21+
pytest-coverage
22+
mock

0 commit comments

Comments
 (0)