Fix mysql test cases

This commit is contained in:
Daniel A. Wozniak 2018-04-26 14:15:47 -07:00
parent 1c527bfd3a
commit 7496f4c5a8
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -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)
)