mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Make sure map and keys are lists when needed
This commit is contained in:
@@ -903,10 +903,10 @@ class DynProvider(BaseProvider):
|
||||
# Sort the values for consistent ordering so that we can compare
|
||||
values = sorted(values, key=_dynamic_value_sort_key)
|
||||
# Ensure that weight is included and if not use the default
|
||||
values = map(lambda v: {
|
||||
values = list(map(lambda v: {
|
||||
'value': v['value'],
|
||||
'weight': v.get('weight', 1),
|
||||
}, values)
|
||||
}, values))
|
||||
|
||||
# Walk through our existing pools looking for a match we can use
|
||||
for pool in pools:
|
||||
|
@@ -670,8 +670,8 @@ class TestDynProviderGeo(TestCase):
|
||||
tds = provider.traffic_directors
|
||||
self.assertEquals(set(['unit.tests.', 'geo.unit.tests.']),
|
||||
set(tds.keys()))
|
||||
self.assertEquals(['A'], tds['unit.tests.'].keys())
|
||||
self.assertEquals(['A'], tds['geo.unit.tests.'].keys())
|
||||
self.assertEquals(['A'], list(tds['unit.tests.'].keys()))
|
||||
self.assertEquals(['A'], list(tds['geo.unit.tests.'].keys()))
|
||||
provider.log.warn.assert_called_with("Unsupported TrafficDirector "
|
||||
"'%s'", 'something else')
|
||||
|
||||
|
Reference in New Issue
Block a user