Merge "Update usage of gabbi in Cloudkitty test"

This commit is contained in:
Zuul 2017-10-26 14:21:11 +00:00 committed by Gerrit Code Review
commit 4c5868d552
3 changed files with 6 additions and 5 deletions

View File

@ -17,10 +17,10 @@
#
import os
from gabbi import handlers
from gabbi.handlers import base
class EnvironStoreHandler(handlers.ResponseHandler):
class EnvironStoreHandler(base.ResponseHandler):
"""Hackish response handler used to store data in environment.
Store data into an environment variable to implement some kind of variable
@ -30,5 +30,6 @@ class EnvironStoreHandler(handlers.ResponseHandler):
test_key_value = {}
def action(self, test, key, value=None):
data = test.extract_json_path_value(test.json_data, value)
data = test.content_handlers[0].extract_json_path_value(
test.response_data, value)
os.environ[key] = test.replace_template(data)

View File

@ -8,7 +8,7 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
coverage>=3.6 # Apache-2.0
kombu<4.0.0 # BSD
ddt>=1.0.1 # MIT
gabbi>=1.11.0,<=1.25.0 # Apache-2.0
gabbi>=1.26.1 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
mock>=1.2 # BSD

View File

@ -7,7 +7,7 @@ envlist = py35,py27,pep8
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
install_command = pip install {opts} {packages}
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt