Skip to content

Commit 92a25f9

Browse files
committed
suggestions
1 parent 02fa154 commit 92a25f9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cloudify_kubernetes/tests/test_utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@
5353
---
5454
"""
5555

56-
test_dir1 = mkdtemp()
57-
5856

5957
class TestUtils(unittest.TestCase):
6058

61-
@patch('cloudify_kubernetes.utils.get_node_instance_dir',
62-
return_value=test_dir1)
59+
@patch('cloudify_kubernetes.utils.get_node_instance_dir')
6360
@patch('cloudify_common_sdk.utils.get_deployment_dir')
64-
def test_set_directory_path(*_, **__):
61+
def test_set_directory_path(*args, **__):
62+
get_node_instance_dir = args[1]
63+
test_dir1 = mkdtemp()
64+
get_node_instance_dir.return_value = test_dir1
65+
6566
some_directory = 'github.com/kubernetes-sigs/aws-ebs-csi-driver/' \
6667
'deploy/kubernetes/overlays/stable/?ref=release-1.14'
6768
listdir = ['cloudbuild.yaml', 'hack', 'tests', 'SECURITY_CONTACTS',
@@ -73,6 +74,7 @@ def test_set_directory_path(*_, **__):
7374

7475
resalt = utils.set_directory_path(some_directory,
7576
target_path=test_dir1)
77+
raise Exception(os.listdir(resalt))
7678
assert os.listdir(resalt) == listdir
7779
shutil.rmtree(test_dir1)
7880

0 commit comments

Comments
 (0)