mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Rip out unit test that doesn't apply anymore
We now use -q with the command so we don't have to test our ability to strip "Listing vhosts" out of the test
This commit is contained in:
parent
aeeaa7c90d
commit
c90431eddc
1 changed files with 1 additions and 17 deletions
|
@ -42,7 +42,7 @@ class RabbitmqTestCase(TestCase):
|
|||
with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
|
||||
self.assertDictEqual(rabbitmq.list_users(), {'guest': set(['administrator'])})
|
||||
|
||||
# 'list_vhosts' function tests: 3
|
||||
# 'list_vhosts' function tests: 1
|
||||
|
||||
def test_list_vhosts(self):
|
||||
'''
|
||||
|
@ -52,22 +52,6 @@ class RabbitmqTestCase(TestCase):
|
|||
with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
|
||||
self.assertListEqual(rabbitmq.list_vhosts(), ['...', 'saltstack', '...'])
|
||||
|
||||
def test_list_vhosts_trailing_done(self):
|
||||
'''
|
||||
Ensure any trailing '...done' line is stripped from output.
|
||||
'''
|
||||
mock_run = MagicMock(return_value='...\nsaltstack\n...done')
|
||||
with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
|
||||
self.assertListEqual(rabbitmq.list_vhosts(), ['...', 'saltstack'])
|
||||
|
||||
def test_list_vhosts_succeeding_listing(self):
|
||||
'''
|
||||
Ensure succeeding 'Listing ...' line is stripped from output
|
||||
'''
|
||||
mock_run = MagicMock(return_value='Listing vhosts ...\nsaltstack\n...')
|
||||
with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
|
||||
self.assertListEqual(rabbitmq.list_vhosts(), ['saltstack', '...'])
|
||||
|
||||
# 'user_exists' function tests: 2
|
||||
|
||||
def test_user_exists_negative(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue