Support list of dicts with omit. Fixes #45907 (#45923)

This commit is contained in:
Matt Martz 2018-11-07 13:41:22 -06:00 committed by GitHub
parent 17b3171917
commit 0d068f1e3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -502,6 +502,14 @@ class TestTaskExecutor(unittest.TestCase):
'a_list': ['POPCORN'],
},
'a_list': ['POPCORN'],
'list_of_lists': [
['some', 'thing'],
],
'list_of_dicts': [
{
'remove': 'POPCORN',
}
],
}
expected = {
@ -516,6 +524,10 @@ class TestTaskExecutor(unittest.TestCase):
'a_list': ['POPCORN'],
},
'a_list': ['POPCORN'],
'list_of_lists': [
['some', 'thing'],
],
'list_of_dicts': [{}],
}
self.assertEqual(remove_omit(data, omit_token), expected)