Esempio n. 1
0
 def test_execute_format_array(self, check_output):
     execute(['some', 'command', '{key}'], replacements={'key': 'value'})
     check_output.assert_called_with(['some', 'command', 'value'])
Esempio n. 2
0
 def test_execute_array(self, check_call, check_output):
     execute(['some', 'command'])
     check_output.assert_called_with(['some', 'command'])
     assert not check_call.called
Esempio n. 3
0
 def test_execute_quoted(self, check_output):
     execute('some command "with quote"')
     check_output.assert_called_with(['some', 'command', 'with quote'])
Esempio n. 4
0
 def test_execute_format_array(self, check_call, check_output):
     execute(['some', 'command', '{key}'], replacements={'key': 'value'})
     check_output.assert_called_with(['some', 'command', 'value'])
Esempio n. 5
0
 def test_execute_quiet(self, check_call, check_output):
     output = 'some output'
     check_output.return_value = output
     assert execute('some command') == output
     check_output.assert_called_with(['some', 'command'])
     assert not check_call.called
Esempio n. 6
0
 def test_execute_array(self, check_call, check_output):
     execute(['some', 'command'])
     check_output.assert_called_with(['some', 'command'])
     assert not check_call.called
Esempio n. 7
0
 def test_execute_quoted(self, check_call, check_output):
     execute('some command "with quote"')
     check_output.assert_called_with(['some', 'command', 'with quote'])
Esempio n. 8
0
 def test_execute_quiet(self, check_call, check_output):
     output = 'some output'
     check_output.return_value = output
     assert execute('some command') == output
     check_output.assert_called_with(['some', 'command'])
     assert not check_call.called
Esempio n. 9
0
 def test_execute_format_array(self, check_output):
     execute(["some", "command", "{key}"], replacements={"key": "value"})
     check_output.assert_called_with(["some", "command", "value"])
Esempio n. 10
0
 def test_execute_quoted(self, check_output):
     execute('some command "with quote"')
     check_output.assert_called_with(["some", "command", "with quote"])
Esempio n. 11
0
 def test_execute_array(self, check_call, check_output):
     execute(["some", "command"])
     check_output.assert_called_with(["some", "command"])
     assert not check_call.called
Esempio n. 12
0
 def test_execute_quiet(self, check_call, check_output):
     output = "some output"
     check_output.return_value = output
     assert execute("some command") == output
     check_output.assert_called_with(["some", "command"])
     assert not check_call.called