From 87336bb43f408103bd5b437ef41c3ee513c87d2c Mon Sep 17 00:00:00 2001 From: Eric D Helms Date: Fri, 15 Jun 2012 15:58:43 -0400 Subject: [PATCH] Updates for broken cli unit tests that were a result of re-factoring work previously done. --- .../tests/core/system/system_group_create_test.py | 9 +-------- .../katello/tests/core/system/system_group_info_test.py | 4 ---- .../katello/tests/core/system/system_group_lock_test.py | 4 ---- .../tests/core/system/system_group_systems_test.py | 4 ---- .../tests/core/system/system_group_unlock_test.py | 4 ---- cli/test/katello/tests/core/version/version_test.py | 4 ---- 6 files changed, 1 insertion(+), 28 deletions(-) diff --git a/cli/test/katello/tests/core/system/system_group_create_test.py b/cli/test/katello/tests/core/system/system_group_create_test.py index e847ebb0342..319f79679f0 100644 --- a/cli/test/katello/tests/core/system/system_group_create_test.py +++ b/cli/test/katello/tests/core/system/system_group_create_test.py @@ -55,13 +55,6 @@ def setUp(self): self.mock(self.action.api, 'create', self.SYSTEM_GROUP) def test_it_calls_system_group_create_api(self): - self.action.run() + self.run_action() self.action.api.create.assert_called_once_with(self.OPTIONS['org'], self.OPTIONS['name'], self.OPTIONS['description'], self.OPTIONS['max_systems']) - - def test_it_returns_error_when_creation_failed(self): - self.mock(self.action.api, 'create', {}) - self.assertEqual(self.action.run(), os.EX_DATAERR) - - def test_it_success_on_successful_creation(self): - self.assertEqual(self.action.run(), os.EX_OK) diff --git a/cli/test/katello/tests/core/system/system_group_info_test.py b/cli/test/katello/tests/core/system/system_group_info_test.py index 3320f10d099..40ca348753a 100644 --- a/cli/test/katello/tests/core/system/system_group_info_test.py +++ b/cli/test/katello/tests/core/system/system_group_info_test.py @@ -48,10 +48,6 @@ def test_it_calls_the_system_group_by_name_api(self): self.action.run() self.module.get_system_group.assert_called_once_with(self.OPTIONS['org'], self.SYSTEM_GROUP['name']) - def test_it_returns_error_when_system_group_not_found(self): - self.mock(self.module, 'get_system_group', None) - self.assertEqual(self.action.run(), os.EX_DATAERR) - def test_it_returns_success_when_system_group_found(self): self.assertEqual(self.action.run(), os.EX_OK) diff --git a/cli/test/katello/tests/core/system/system_group_lock_test.py b/cli/test/katello/tests/core/system/system_group_lock_test.py index 15a80fcd2ed..0a807809aa2 100644 --- a/cli/test/katello/tests/core/system/system_group_lock_test.py +++ b/cli/test/katello/tests/core/system/system_group_lock_test.py @@ -49,10 +49,6 @@ def test_it_calls_the_system_group_by_name_api(self): self.action.run() self.module.get_system_group.assert_called_once_with(self.OPTIONS['org'], self.SYSTEM_GROUP['name']) - def test_it_returns_error_when_system_group_not_found(self): - self.mock(self.module, 'get_system_group', None) - self.assertEqual(self.action.run(), os.EX_DATAERR) - def test_it_returns_success_when_system_group_found(self): self.assertEqual(self.action.run(), os.EX_OK) diff --git a/cli/test/katello/tests/core/system/system_group_systems_test.py b/cli/test/katello/tests/core/system/system_group_systems_test.py index 583429b52a3..976315f19ef 100644 --- a/cli/test/katello/tests/core/system/system_group_systems_test.py +++ b/cli/test/katello/tests/core/system/system_group_systems_test.py @@ -49,10 +49,6 @@ def test_it_calls_the_get_system_group_util(self): self.action.run() self.module.get_system_group.assert_called_once_with(self.OPTIONS['org'], self.SYSTEM_GROUP['name']) - def test_it_returns_error_when_system_group_not_found(self): - self.mock(self.module, 'get_system_group', None) - self.assertEqual(self.action.run(), os.EX_DATAERR) - def test_it_returns_success_when_system_group_found(self): self.assertEqual(self.action.run(), os.EX_OK) diff --git a/cli/test/katello/tests/core/system/system_group_unlock_test.py b/cli/test/katello/tests/core/system/system_group_unlock_test.py index 7ce88ac0abe..4ff88f519a8 100644 --- a/cli/test/katello/tests/core/system/system_group_unlock_test.py +++ b/cli/test/katello/tests/core/system/system_group_unlock_test.py @@ -49,10 +49,6 @@ def test_it_calls_the_system_group_by_name_api(self): self.action.run() self.module.get_system_group.assert_called_once_with(self.OPTIONS['org'], self.SYSTEM_GROUP['name']) - def test_it_returns_error_when_system_group_not_found(self): - self.mock(self.module, 'get_system_group', None) - self.assertEqual(self.action.run(), os.EX_DATAERR) - def test_it_returns_success_when_system_group_found(self): self.assertEqual(self.action.run(), os.EX_OK) diff --git a/cli/test/katello/tests/core/version/version_test.py b/cli/test/katello/tests/core/version/version_test.py index 11f2abd913c..abe750e700a 100644 --- a/cli/test/katello/tests/core/version/version_test.py +++ b/cli/test/katello/tests/core/version/version_test.py @@ -9,7 +9,6 @@ from katello.client.core.version import Info - class VersionTest(CLIActionTestCase): def setUp(self): @@ -20,6 +19,3 @@ def setUp(self): def test_calls_the_api(self): self.run_action() self.action.api.version_formatted.assert_called_once() - - def test_call_returns_correct_value(self): - self.assertEqual(self.action.run(), version_data.VERSION_INFO)