Skip to content

Commit

Permalink
Updates for broken cli unit tests that were a result of re-factoring
Browse files Browse the repository at this point in the history
work previously done.
  • Loading branch information
ehelms committed Jun 15, 2012
1 parent 99487d0 commit 87336bb
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 28 deletions.
Expand Up @@ -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)
4 changes: 0 additions & 4 deletions cli/test/katello/tests/core/system/system_group_info_test.py
Expand Up @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions cli/test/katello/tests/core/system/system_group_lock_test.py
Expand Up @@ -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)

Expand Down
Expand Up @@ -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)

Expand Down
Expand Up @@ -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)

Expand Down
4 changes: 0 additions & 4 deletions cli/test/katello/tests/core/version/version_test.py
Expand Up @@ -9,7 +9,6 @@
from katello.client.core.version import Info



class VersionTest(CLIActionTestCase):

def setUp(self):
Expand All @@ -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)

0 comments on commit 87336bb

Please sign in to comment.