mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix mysql test cases
This commit is contained in:
parent
1c527bfd3a
commit
7496f4c5a8
1 changed files with 12 additions and 2 deletions
|
@ -11,6 +11,16 @@ from tests.support.mock import NO_MOCK, NO_MOCK_REASON
|
|||
import salt.pillar.mysql as mysql
|
||||
|
||||
|
||||
def sorted_result(result):
|
||||
sorted_result = {}
|
||||
for x in result:
|
||||
sorted_result[x] = sorted(result[x])
|
||||
for y in sorted_result[x]:
|
||||
for z in y:
|
||||
y[z] = sorted(y[z])
|
||||
return sorted_result
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||
@skipIf(not mysql.HAS_MYSQL, 'Install MySQL bindings before running MySQL unit tests.')
|
||||
class MysqlPillarTestCase(TestCase):
|
||||
|
@ -541,7 +551,7 @@ class MysqlPillarTestCase(TestCase):
|
|||
]
|
||||
}
|
||||
]},
|
||||
return_data.result
|
||||
sorted_result(return_data.result)
|
||||
)
|
||||
|
||||
def test_302_process_results_with_lists_consecutive(self):
|
||||
|
@ -566,5 +576,5 @@ class MysqlPillarTestCase(TestCase):
|
|||
]
|
||||
]
|
||||
]},
|
||||
return_data.result
|
||||
sorted_result(return_data.result)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue