summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Beisner <ryan.beisner@canonical.com>2018-11-01 22:17:58 -0500
committerRyan Beisner <ryan.beisner@canonical.com>2018-11-01 22:39:54 -0500
commit7b9ed48f9e8e8e3c6ed6fd5bb5b9ca36567677c0 (patch)
treeb0cca305d4e553f09058612b8fe88e919b917121
parent8692aa9fb65e5455c46001c5430fcb93ba10612d (diff)
downloadcharm-nova-lxd-7b9ed48f9e8e8e3c6ed6fd5bb5b9ca36567677c0.zip
charm-nova-lxd-7b9ed48f9e8e8e3c6ed6fd5bb5b9ca36567677c0.tar.gz
charm-nova-lxd-7b9ed48f9e8e8e3c6ed6fd5bb5b9ca36567677c0.tar.bz2
Fix lint in unit tests re: py3-first and py2 compat
Change-Id: Icdcbeaffac1b001dcffbbf9376ef2b90c373f170
-rw-r--r--tox.ini1
-rw-r--r--unit_tests/testing.py4
2 files changed, 2 insertions, 3 deletions
diff --git a/tox.ini b/tox.ini
index b6e41e7..03805ef 100644
--- a/tox.ini
+++ b/tox.ini
@@ -32,7 +32,6 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
-basepython = python2.7
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = flake8 {posargs} hooks unit_tests tests actions lib
diff --git a/unit_tests/testing.py b/unit_tests/testing.py
index 3da1051..08c6db7 100644
--- a/unit_tests/testing.py
+++ b/unit_tests/testing.py
@@ -40,7 +40,7 @@ def load_config():
if not config:
logging.error('Could not find config.yaml in any parent directory '
- 'of %s. ' % file)
+ 'of %s. ' % __file__)
raise Exception
return yaml.safe_load(open(config).read())['options']
@@ -127,7 +127,7 @@ def patch_open():
Yields the mock for "open" and "file", respectively.'''
mock_open = MagicMock(spec=open)
- mock_file = MagicMock(spec=file)
+ mock_file = MagicMock(spec=file) # noqa - transitional py2 py3 lint work-around
@contextmanager
def stub_open(*args, **kwargs):

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git