Update hacking version to 1.1.x

This commit updates hacking version in test-requirements and
fixes some related pep8 issues

Change-Id: I67d85eb5bef72c38cc5360b5625d6b1c37adb40f
Story: 2004930
Task: 29315
This commit is contained in:
akhiljain23 2019-06-12 12:01:54 +05:30 committed by Akhil jain
parent 836b839905
commit 0fae94fac2
6 changed files with 24 additions and 24 deletions

View File

@ -30,7 +30,7 @@ gevent==1.2.2
gitdb==0.6.4
GitPython==1.0.1
greenlet==0.4.10
hacking==0.12.0
hacking==1.1.0
httplib2==0.9.1
idna==2.6
imagesize==0.7.1

View File

@ -20,15 +20,15 @@ import six
@six.add_metaclass(abc.ABCMeta)
class AbstractMetricsRepository(object):
MULTIPLE_METRICS_MESSAGE = ("Found multiple metrics matching metric name"
+ " and dimensions. Please refine your search"
+ " criteria using a unique"
+ " metric name or additional dimensions."
+ " Alternatively, you may specify"
+ " 'merge_metrics=True' as a query"
+ " parameter to combine all metrics"
+ " matching search criteria into a single"
+ " series.")
MULTIPLE_METRICS_MESSAGE = ("Found multiple metrics matching metric name" +
" and dimensions. Please refine your search" +
" criteria using a unique" +
" metric name or additional dimensions." +
" Alternatively, you may specify" +
" 'merge_metrics=True' as a query" +
" parameter to combine all metrics" +
" matching search criteria into a single" +
" series.")
@abc.abstractmethod
def list_metrics(self, tenant_id, region, name, dimensions, offset, limit):

View File

@ -249,8 +249,8 @@ class AlarmDefinitionsRepository(sql_repository.SQLRepository,
value=bindparam('b_value')))
self.delete_aa_query = (delete(aa)
.where(aa.c.alarm_definition_id
== bindparam('b_alarm_definition_id')))
.where(aa.c.alarm_definition_id ==
bindparam('b_alarm_definition_id')))
self.delete_aa_state_query = (
delete(aa) .where(

View File

@ -33,13 +33,13 @@ class TestVersions(base.BaseApiTestCase):
self.assertEqual(result.status, falcon.HTTP_200)
response = result.json
self.assertIsInstance(response, dict)
self.assertTrue(set(['links', 'elements']) ==
set(response))
self.assertEqual(set(['links', 'elements']),
set(response))
links = response['links']
self.assertIsInstance(links, list)
link = links[0]
self.assertTrue(set(['rel', 'href']) ==
set(link))
self.assertEqual(set(['rel', 'href']),
set(link))
self.assertEqual(link['rel'], u'self')
self.assertTrue(link['href'].endswith('/'))
@ -49,8 +49,8 @@ class TestVersions(base.BaseApiTestCase):
response = result.json
self.assertIsInstance(response, dict)
version = response
self.assertTrue(set(['id', 'links', 'status', 'updated']) ==
set(version))
self.assertEqual(set(['id', 'links', 'status', 'updated']),
set(version))
self.assertEqual(version['id'], u'v2.0')
self.assertEqual(version['status'], u'CURRENT')
date_object = datetime.datetime.strptime(version['updated'],
@ -59,8 +59,8 @@ class TestVersions(base.BaseApiTestCase):
links = response['links']
self.assertIsInstance(links, list)
link = links[0]
self.assertTrue(set(['rel', 'href']) ==
set(link))
self.assertEqual(set(['rel', 'href']),
set(link))
self.assertEqual(link['rel'], u'self')
self.assertTrue(link['href'].endswith('/v2.0'))

View File

@ -591,9 +591,9 @@ def _get_old_query_params(parsed_uri):
query_param_name, query_param_val = query_param.split('=', 1)
old_query_params.append(urlparse.quote(
query_param_name.encode('utf8'), safe='')
+ "="
+ urlparse.quote(query_param_val.encode('utf8'), safe=''))
query_param_name.encode('utf8'), safe='') +
"=" +
urlparse.quote(query_param_val.encode('utf8'), safe=''))
return old_query_params

View File

@ -4,7 +4,7 @@
# Hacking already pins down pep8, pyflakes and flake8
bandit>=1.1.0 # Apache-2.0
bashate>=0.5.1 # Apache-2.0
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking>=1.1.0,<1.2.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
coverage!=4.4,>=4.0 # Apache-2.0
cassandra-driver!=3.6.0,>=3.3.0 # Apache-2.0