I'm creating my first test script (yay!) I'm have a list of dictionaries where one of the keys is a list. I'd like the test to past if the list (in the dictionary) is in any order. I know you can use assertCountEqual to check list equality regardless of order, but can you do that for a list that contains a dictinary of lists? See below for example
Will Succeed
def test(self):
output = [2,1]
desired_output = [1,2]
self.assertCountEqual(output, desired_output)
Will Fail
def test(self):
desired_output = [{'count': 2, 'columns': ['col2', 'col5']}]
output = [{'count': 2, 'columns': ['col5', 'col2']}]
self.assertCountEqual(output, desired_output)
Thanks