Skip to content

Commit 65c6229

Browse files
committed
Add mock to test-requirements.txt
1 parent 72984ca commit 65c6229

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

test-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mock
12
pytest
2-
pytest-xdist
33
pytest-cov
4+
pytest-xdist

test_cfn_resource.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import json
2+
import mock
3+
24
import cfn_resource
35

46

@@ -56,7 +58,6 @@ def wrapper(*args):
5658

5759
### Tests for the wrapper function
5860

59-
import mock
6061

6162
@mock.patch('urllib2.urlopen')
6263
def test_client_code_failure(urlmock):
@@ -77,6 +78,7 @@ def flaky_function(*args):
7778
assert reply['StackId'] == base_event['StackId']
7879
assert reply['Reason'] == "Exception was raised while handling custom resource"
7980

81+
8082
@mock.patch('urllib2.urlopen')
8183
def test_sends_put_request(urlmock):
8284
rsrc = cfn_resource.Resource()

0 commit comments

Comments
 (0)