Merge pull request #47342 from dwoz/test_mysql_fix

Fix mysql test cases
This commit is contained in:
Daniel Wozniak 2018-04-26 17:50:52 -07:00 committed by GitHub
commit dac04261b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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