Enable \. in yaml lookups
This commit is contained in:
@@ -61,9 +61,11 @@ class YamlTestCase(TestCase):
|
|||||||
def _lookup(self, path):
|
def _lookup(self, path):
|
||||||
# fetch the possibly nested value from last_response
|
# fetch the possibly nested value from last_response
|
||||||
value = self.last_response
|
value = self.last_response
|
||||||
|
path = path.replace(r'\.', '\1')
|
||||||
for step in path.split('.'):
|
for step in path.split('.'):
|
||||||
if not step:
|
if not step:
|
||||||
continue
|
continue
|
||||||
|
step = step.replace('\1', '.')
|
||||||
if step.isdigit():
|
if step.isdigit():
|
||||||
step = int(step)
|
step = int(step)
|
||||||
self.assertIsInstance(value, list)
|
self.assertIsInstance(value, list)
|
||||||
|
|||||||
Reference in New Issue
Block a user