mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Fix hook test
This commit is contained in:
parent
330977e988
commit
0b5df9049a
1 changed files with 6 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import mock
|
||||
import unittest
|
||||
|
||||
from certbot.compat import os
|
||||
|
||||
class ExecuteTest(unittest.TestCase):
|
||||
"""Tests for certbot.compat.misc.execute_command."""
|
||||
|
|
@ -28,7 +29,11 @@ class ExecuteTest(unittest.TestCase):
|
|||
|
||||
executed_command = mock_popen.call_args[1].get(
|
||||
"args", mock_popen.call_args[0][0])
|
||||
self.assertEqual(executed_command, given_command)
|
||||
if os.name == 'nt':
|
||||
expected_command = ['powershell.exe', '-Command', given_command]
|
||||
else:
|
||||
expected_command = given_command
|
||||
self.assertEqual(executed_command, expected_command)
|
||||
|
||||
mock_logger.info.assert_any_call("Running %s command: %s",
|
||||
given_name, given_command)
|
||||
|
|
|
|||
Loading…
Reference in a new issue