def test_run_all_suites_app_not_found( self, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs with self.assertRaises(KeyError): test.run_all_suites('app-c')
def test_run_all_suites_app_found(self, fake_exit, fake_run_tests, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs fake_run_tests.return_value = 0 test.run_all_suites('app-a') fake_run_tests.assert_has_calls([call('app-a', 'nose', None)]) fake_exit.assert_has_calls([call(0)])
def test_run_all_suites_app_found( self, fake_exit, fake_run_tests, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs fake_run_tests.return_value = 0 test.run_all_suites('app-a') fake_run_tests.assert_has_calls([call('app-a', 'nose', None)]) fake_exit.assert_has_calls([call(0)])
def test_run_all_suites_lib_found(self, fake_exit, fake_run_tests, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs fake_run_tests.side_effect = [0, 1] test.run_all_suites('multi-suite-lib') fake_run_tests.assert_has_calls([call('multi-suite-lib', 'nose1', None), call('multi-suite-lib', 'nose2', None)]) fake_exit.assert_has_calls([call(1)])
def test_run_all_suites_lib_found( self, fake_exit, fake_run_tests, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs fake_run_tests.side_effect = [0, 1] test.run_all_suites('multi-suite-lib') fake_run_tests.assert_has_calls([ call('multi-suite-lib', 'nose1', None), call('multi-suite-lib', 'nose2', None) ]) fake_exit.assert_has_calls([call(1)])
def test_run_all_suites_app_not_found(self, fake_lib_get_volumes, fake_app_get_volumes, fake_update_nfs, fake_ensure_current_image, fake_expanded_libs, fake_get_docker_client, fake_initialize_vm): fake_expanded_libs.return_value = self.specs with self.assertRaises(KeyError): test.run_all_suites('app-c')