remove trailing whitespace

fix subdict_match test cases
This commit is contained in:
Bastiaan Bakker 2015-11-25 17:12:17 +01:00 committed by rallytime
parent 44713cdb95
commit 5226cd8f79

View file

@ -216,7 +216,7 @@ class UtilsTestCase(TestCase):
test_two_level_dict_and_list = {
'abc': ['def', 'ghi', {'lorem': {'ipsum': [{'dolor': 'sit'}]}}],
}
test_four_level_dict = {'a': {'b': {'c': 'v'}}}
test_three_level_dict = {'a': {'b': {'c': 'v'}}}
self.assertTrue(
utils.subdict_match(
@ -265,22 +265,22 @@ class UtilsTestCase(TestCase):
test_two_level_dict_and_list, 'abc:lorem:ipsum:dolor:sit'
)
)
# Test four level dict match for reference
# Test four level dict match for reference
self.assertTrue(
utils.subdict_match(
test_four_level_dict, 'a:b:c:v'
test_three_level_dict, 'a:b:c:v'
)
)
self.assertFalse(
# Test regression in 2015.8 where 'a:v' would match 'a:b:c:v'
# Test regression in 2015.8 where 'a:c:v' would match 'a:b:c:v'
utils.subdict_match(
test_four_level_dict, 'a:v'
test_three_level_dict, 'a:c:v'
)
)
# Test wildcard match
self.assertTrue(
utils.subdict_match(
test_four_level_dict, 'a:*:v'
test_three_level_dict, 'a:*:c:v'
)
)