diff --git a/fuel_agent/drivers/base.py b/fuel_agent/drivers/base.py index 9ce4224..77003f9 100644 --- a/fuel_agent/drivers/base.py +++ b/fuel_agent/drivers/base.py @@ -13,6 +13,8 @@ # limitations under the License. import abc +import copy + import six @@ -25,4 +27,4 @@ class BaseDataDriver(object): """ def __init__(self, data): - self.data = data + self.data = copy.deepcopy(data) diff --git a/test-requirements.txt b/test-requirements.txt index 1ad9300..5577c4b 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,4 +2,5 @@ hacking>=0.8.0,<0.9 mock>=1.0 oslotest==1.0 testtools>=0.9.34 -testrepository>=0.0.18 +pytest>=2.7.2 +pytest-cov>=1.8.1 diff --git a/tox.ini b/tox.ini index b54b3fe..7c849fe 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --slowest --testr-args='{posargs:}' + py.test -vv {posargs:fuel_agent/tests} [tox:jenkins] downloadcache = ~/cache/pip @@ -23,7 +23,7 @@ commands = [testenv:cover] setenv = VIRTUAL_ENV={envdir} commands = - python setup.py testr --coverage {posargs:fuel_agent} + py.test --cov fuel_agent {posargs:fuel_agent/tests} [testenv:venv] commands = {posargs:}