Merge "Update hacking version to 1.1.x"

This commit is contained in:
Zuul 2019-06-27 10:29:58 +00:00 committed by Gerrit Code Review
commit 45aaa78fd5
6 changed files with 24 additions and 24 deletions

View File

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

View File

@ -20,15 +20,15 @@ import six
@six.add_metaclass(abc.ABCMeta) @six.add_metaclass(abc.ABCMeta)
class AbstractMetricsRepository(object): class AbstractMetricsRepository(object):
MULTIPLE_METRICS_MESSAGE = ("Found multiple metrics matching metric name" MULTIPLE_METRICS_MESSAGE = ("Found multiple metrics matching metric name" +
+ " and dimensions. Please refine your search" " and dimensions. Please refine your search" +
+ " criteria using a unique" " criteria using a unique" +
+ " metric name or additional dimensions." " metric name or additional dimensions." +
+ " Alternatively, you may specify" " Alternatively, you may specify" +
+ " 'merge_metrics=True' as a query" " 'merge_metrics=True' as a query" +
+ " parameter to combine all metrics" " parameter to combine all metrics" +
+ " matching search criteria into a single" " matching search criteria into a single" +
+ " series.") " series.")
@abc.abstractmethod @abc.abstractmethod
def list_metrics(self, tenant_id, region, name, dimensions, offset, limit): 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'))) value=bindparam('b_value')))
self.delete_aa_query = (delete(aa) self.delete_aa_query = (delete(aa)
.where(aa.c.alarm_definition_id .where(aa.c.alarm_definition_id ==
== bindparam('b_alarm_definition_id'))) bindparam('b_alarm_definition_id')))
self.delete_aa_state_query = ( self.delete_aa_state_query = (
delete(aa) .where( delete(aa) .where(

View File

@ -33,12 +33,12 @@ class TestVersions(base.BaseApiTestCase):
self.assertEqual(result.status, falcon.HTTP_200) self.assertEqual(result.status, falcon.HTTP_200)
response = result.json response = result.json
self.assertIsInstance(response, dict) self.assertIsInstance(response, dict)
self.assertTrue(set(['links', 'elements']) == self.assertEqual(set(['links', 'elements']),
set(response)) set(response))
links = response['links'] links = response['links']
self.assertIsInstance(links, list) self.assertIsInstance(links, list)
link = links[0] link = links[0]
self.assertTrue(set(['rel', 'href']) == self.assertEqual(set(['rel', 'href']),
set(link)) set(link))
self.assertEqual(link['rel'], u'self') self.assertEqual(link['rel'], u'self')
self.assertTrue(link['href'].endswith('/')) self.assertTrue(link['href'].endswith('/'))
@ -49,7 +49,7 @@ class TestVersions(base.BaseApiTestCase):
response = result.json response = result.json
self.assertIsInstance(response, dict) self.assertIsInstance(response, dict)
version = response version = response
self.assertTrue(set(['id', 'links', 'status', 'updated']) == self.assertEqual(set(['id', 'links', 'status', 'updated']),
set(version)) set(version))
self.assertEqual(version['id'], u'v2.0') self.assertEqual(version['id'], u'v2.0')
self.assertEqual(version['status'], u'CURRENT') self.assertEqual(version['status'], u'CURRENT')
@ -59,7 +59,7 @@ class TestVersions(base.BaseApiTestCase):
links = response['links'] links = response['links']
self.assertIsInstance(links, list) self.assertIsInstance(links, list)
link = links[0] link = links[0]
self.assertTrue(set(['rel', 'href']) == self.assertEqual(set(['rel', 'href']),
set(link)) set(link))
self.assertEqual(link['rel'], u'self') self.assertEqual(link['rel'], u'self')
self.assertTrue(link['href'].endswith('/v2.0')) 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) query_param_name, query_param_val = query_param.split('=', 1)
old_query_params.append(urlparse.quote( old_query_params.append(urlparse.quote(
query_param_name.encode('utf8'), safe='') query_param_name.encode('utf8'), safe='') +
+ "=" "=" +
+ urlparse.quote(query_param_val.encode('utf8'), safe='')) urlparse.quote(query_param_val.encode('utf8'), safe=''))
return old_query_params return old_query_params

View File

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