Home | History | Annotate | Download | only in site_utils

Lines Matching refs:run_cmd

89     def test_verify_repo_clean(self, run_cmd):
92 @param run_cmd: Mock of subprocess call used.
95 run_cmd.return_value = 'nothing to commit (working directory clean)\n'
99 run_cmd.return_value = self.PROD_STATUS
104 run_cmd.return_value = "That's a very dirty repo you've got."
109 def test_repo_versions(self, run_cmd):
112 @param run_cmd: Mock of subprocess call used.
123 run_cmd.return_value = self.PROD_VERSIONS
127 run_cmd.assert_called_with(
132 def test_repo_sync(self, run_cmd):
135 @param run_cmd: Mock of subprocess call used.
138 run_cmd.assert_called_with(['repo', 'sync'])
152 def test_update_command(self, run_cmd):
155 @param run_cmd: Mock of subprocess call used.
160 self.assertFalse(run_cmd.called)
164 run_cmd.assert_called_with('sudo service apache2 reload', shell=True,
170 run_cmd.assert_called_with(expanded_cmd, shell=True,
176 run_cmd.side_effect = failure
181 def test_restart_service(self, run_cmd):
184 @param run_cmd: Mock of subprocess call used.
188 run_cmd.assert_called_with(['sudo', 'service', 'foobar', 'restart'])
191 def test_restart_status(self, run_cmd):
194 @param run_cmd: Mock of subprocess call used.
198 run_cmd.assert_called_with(['sudo', 'status', 'foobar'])
237 def test_report_changes_no_update(self, run_cmd):
240 @param run_cmd: Mock of subprocess call used.
249 run_cmd.return_value = 'hash1 Fix change.\nhash2 Bad change.\n'
258 self.assertFalse(run_cmd.called)
261 def test_report_changes_diff(self, run_cmd):
264 @param run_cmd: Mock of subprocess call used.
279 run_cmd.return_value = 'hash1 Fix change.\nhash2 Bad change.\n'
297 run_cmd.assert_called_with(