From 613d0791811b366b69ec9939849f79ad83fc4926 Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Tue, 17 Apr 2018 14:57:18 -0400 Subject: [PATCH] Edit subprocess command in updater.py ... to use 'python -m tuf.scripts.simple_server' which works on Linux, MacOS, and Windows Signed-off-by: Vladimir Diaz --- tests/test_updater.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_updater.py b/tests/test_updater.py index 909972ac..d2483e38 100644 --- a/tests/test_updater.py +++ b/tests/test_updater.py @@ -98,7 +98,7 @@ def setUpClass(cls): # as a delegated role 'targets/role1', three target files, five key files, # etc. cls.SERVER_PORT = random.randint(30000, 45000) - command = ['python', 'simple_server.py', str(cls.SERVER_PORT)] + command = ['python', '-m', 'tuf.scripts.simple_server', str(cls.SERVER_PORT)] cls.server_process = subprocess.Popen(command, stderr=subprocess.PIPE) logger.info('\n\tServer process started.') logger.info('\tServer process id: '+str(cls.server_process.pid)) @@ -1701,8 +1701,8 @@ def setUp(self): self.SERVER_PORT = 30001 self.SERVER_PORT2 = 30002 - command = ['python', 'simple_server.py', str(self.SERVER_PORT)] - command2 = ['python', 'simple_server.py', str(self.SERVER_PORT2)] + command = ['python', '-m', 'tuf.scripts.simple_server', str(self.SERVER_PORT)] + command2 = ['python', '-m', 'tuf.scripts.simple_server', str(self.SERVER_PORT2)] self.server_process = subprocess.Popen(command, stderr=subprocess.PIPE, cwd=self.repository_directory)