diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..7e6bb06 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=stackforge/swiftsync.git diff --git a/swsync/filler.py b/swsync/filler.py index 7f5c15a..5ddd3d0 100644 --- a/swsync/filler.py +++ b/swsync/filler.py @@ -88,7 +88,7 @@ def create_swift_user(client, account_name, account_id, user_amount): if role.name == get_config('filler', 'swift_operator_role')] if not roleid: logging.error('Could not find swift_operator_role %s in keystone' % - get_config('filler', 'swift_operator_role')) + get_config('filler', 'swift_operator_role')) sys.exit(1) roleid = roleid[0] # Add tenant/user in swift operator role/group diff --git a/tests/functional/test_syncer_filter.py b/tests/functional/test_syncer_filter.py index da4dff0..b4811ee 100644 --- a/tests/functional/test_syncer_filter.py +++ b/tests/functional/test_syncer_filter.py @@ -209,7 +209,6 @@ class TestSyncer(unittest.TestCase): """create two empty accounts, Sync only one """ index = {} - test_account_name = "account_test" # create account self.created = filler.create_swift_account(self.o_ks_client, diff --git a/tests/units/test_accounts.py b/tests/units/test_accounts.py index 8d9264f..15ad5ea 100644 --- a/tests/units/test_accounts.py +++ b/tests/units/test_accounts.py @@ -213,7 +213,7 @@ class TestAccountSync(TestAccountBase): "http://test.com", tenant_name, "user", "password") tenant_id = fakes.TENANTS_LIST[tenant_name]['id'] self.assertEqual(ret[0], "%s/v1/AUTH_%s" % (fakes.STORAGE_DEST, - tenant_id)) + tenant_id)) def test_get_ks_auth_orig(self): _, kwargs = self.accounts_cls.get_ks_auth_orig()() diff --git a/tools/pip-requires b/tools/pip-requires index 33628ff..647c89b 100644 --- a/tools/pip-requires +++ b/tools/pip-requires @@ -1,7 +1,6 @@ simplejson http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift python-swiftclient -webob python-dateutil netifaces python-keystoneclient diff --git a/tools/test-requires b/tools/test-requires index 504ec63..6fee756 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -4,7 +4,6 @@ distribute>=0.6.24 mox nose nosehtmloutput -openstack.nose_plugin testrepository>=0.0.13 testtools>=0.9.22 unittest2 diff --git a/tox.ini b/tox.ini index a5bb3d7..f67014a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,flake8 +envlist = py27,pep8 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -14,7 +14,7 @@ deps = -r{toxinidir}/tools/pip-requires -r{toxinidir}/tools/test-requires commands = python setup.py testr --testr-args="{posargs}" -[testenv:flake8] +[testenv:pep8] sitepackages = False commands = flake8 --show-source swsync bin setup.py tests @@ -28,6 +28,6 @@ commands = python setup.py testr --coverage downloadcache = ~/cache/pip [flake8] -ignore = E12,E711,E721,E712,H302,H303,H403,H404,F +ignore = E12,E711,E721,E712,H302,H303,H403,H404,H803 builtins = _ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,plugins,tools