コード例 #1
0
ファイル: scripts_test.py プロジェクト: apeace/dusty
 def test_execute_script_valid_input_not_accept_arguments(self, fake_exec_docker):
     execute_script('app-b', 'example', ['.', './', '..'])
     fake_exec_docker.assert_has_calls([])
コード例 #2
0
ファイル: scripts_test.py プロジェクト: apeace/dusty
 def test_execute_script_script_not_found(self):
     with self.assertRaises(KeyError):
         execute_script('app-a', 'wrong name')
コード例 #3
0
ファイル: scripts_test.py プロジェクト: apeace/dusty
 def test_execute_script_valid_input_three_args(self, fake_exec_docker):
     execute_script('app-a', 'example', ['.', './', '..'])
     fake_exec_docker.assert_called_once_with('exec', '-i', 'dusty_app-a_1', 'sh', '/command_files/dusty_command_file_app-a_script_example.sh', '.', './', '..')
コード例 #4
0
ファイル: scripts_test.py プロジェクト: apeace/dusty
 def test_execute_script_nonexistent_app(self):
     with self.assertRaises(KeyError):
         execute_script('some-nonexistent-app', 'this arg should not matter')
コード例 #5
0
ファイル: scripts_test.py プロジェクト: apeace/dusty
 def test_execute_script_no_scripts(self):
     with self.assertRaises(KeyError):
         execute_script('app-b', 'should not matter')
コード例 #6
0
ファイル: scripts_test.py プロジェクト: thieman/dusty
 def test_execute_script_valid_input_not_accept_arguments(
         self, fake_exec_docker):
     execute_script('app-b', 'example', ['.', './', '..'])
     fake_exec_docker.assert_has_calls([])
コード例 #7
0
ファイル: scripts_test.py プロジェクト: thieman/dusty
 def test_execute_script_valid_input_three_args(self, fake_exec_docker):
     execute_script('app-a', 'example', ['.', './', '..'])
     fake_exec_docker.assert_called_once_with(
         'exec', '-i', 'dusty_app-a_1', 'sh',
         '/command_files/dusty_command_file_app-a_script_example.sh', '.',
         './', '..')
コード例 #8
0
ファイル: scripts_test.py プロジェクト: thieman/dusty
 def test_execute_script_script_not_found(self):
     with self.assertRaises(KeyError):
         execute_script('app-a', 'wrong name')
コード例 #9
0
ファイル: scripts_test.py プロジェクト: thieman/dusty
 def test_execute_script_no_scripts(self):
     with self.assertRaises(KeyError):
         execute_script('app-b', 'should not matter')
コード例 #10
0
ファイル: scripts_test.py プロジェクト: thieman/dusty
 def test_execute_script_nonexistent_app(self):
     with self.assertRaises(KeyError):
         execute_script('some-nonexistent-app',
                        'this arg should not matter')