update to hacking 0.8
hacking 0.8 brings us a working H302 rule (should import modules not objects) and a bunch of python 3 compat rules. fix the python 3 compat issues to make this landable. Change-Id: I53abf39394afc54da5ad049802dca0032f14882d
This commit is contained in:
parent
c38be6def1
commit
6b44788b65
@ -16,7 +16,7 @@
|
||||
|
||||
from tempest.api.object_storage import base
|
||||
from tempest.common.utils import data_utils
|
||||
from tempest.test import attr, HTTP_SUCCESS
|
||||
from tempest import test
|
||||
|
||||
|
||||
class StaticWebTest(base.BaseObjectTest):
|
||||
@ -48,7 +48,7 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
cls.data.teardown_all()
|
||||
super(StaticWebTest, cls).tearDownClass()
|
||||
|
||||
@attr('gate')
|
||||
@test.attr('gate')
|
||||
def test_web_index(self):
|
||||
headers = {'web-index': self.object_name}
|
||||
|
||||
@ -59,7 +59,7 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
# we should retrieve the self.object_name file
|
||||
resp, body = self.custom_account_client.request("GET",
|
||||
self.container_name)
|
||||
self.assertIn(int(resp['status']), HTTP_SUCCESS)
|
||||
self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
|
||||
self.assertEqual(body, self.object_data)
|
||||
|
||||
# clean up before exiting
|
||||
@ -70,7 +70,7 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
self.container_name)
|
||||
self.assertNotIn('x-container-meta-web-index', body)
|
||||
|
||||
@attr('gate')
|
||||
@test.attr('gate')
|
||||
def test_web_listing(self):
|
||||
headers = {'web-listings': 'true'}
|
||||
|
||||
@ -81,7 +81,7 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
# we should retrieve a listing of objects
|
||||
resp, body = self.custom_account_client.request("GET",
|
||||
self.container_name)
|
||||
self.assertIn(int(resp['status']), HTTP_SUCCESS)
|
||||
self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
|
||||
self.assertIn(self.object_name, body)
|
||||
|
||||
# clean up before exiting
|
||||
@ -92,7 +92,7 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
self.container_name)
|
||||
self.assertNotIn('x-container-meta-web-listings', body)
|
||||
|
||||
@attr('gate')
|
||||
@test.attr('gate')
|
||||
def test_web_listing_css(self):
|
||||
headers = {'web-listings': 'true',
|
||||
'web-listings-css': 'listings.css'}
|
||||
@ -104,12 +104,12 @@ class StaticWebTest(base.BaseObjectTest):
|
||||
# we should retrieve a listing of objects
|
||||
resp, body = self.custom_account_client.request("GET",
|
||||
self.container_name)
|
||||
self.assertIn(int(resp['status']), HTTP_SUCCESS)
|
||||
self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
|
||||
self.assertIn(self.object_name, body)
|
||||
css = '<link rel="stylesheet" type="text/css" href="listings.css" />'
|
||||
self.assertIn(css, body)
|
||||
|
||||
@attr('gate')
|
||||
@test.attr('gate')
|
||||
def test_web_error(self):
|
||||
headers = {'web-listings': 'true',
|
||||
'web-error': self.object_name}
|
||||
|
@ -1,4 +1,4 @@
|
||||
hacking>=0.5.6,<0.8
|
||||
hacking>=0.8.0,<0.9
|
||||
# needed for doc build
|
||||
docutils==0.9.1
|
||||
sphinx>=1.1.2
|
||||
|
@ -36,11 +36,11 @@ def verify_glance_api_versions(os):
|
||||
__, versions = os.image_client.get_versions()
|
||||
if CONF.image_feature_enabled.api_v1 != ('v1.1' in versions or 'v1.0' in
|
||||
versions):
|
||||
print 'Config option image api_v1 should be change to: %s' % (
|
||||
not CONF.image_feature_enabled.api_v1)
|
||||
print('Config option image api_v1 should be change to: %s' % (
|
||||
not CONF.image_feature_enabled.api_v1))
|
||||
if CONF.image_feature_enabled.api_v2 != ('v2.0' in versions):
|
||||
print 'Config option image api_v2 should be change to: %s' % (
|
||||
not CONF.image_feature_enabled.api_v2)
|
||||
print('Config option image api_v2 should be change to: %s' % (
|
||||
not CONF.image_feature_enabled.api_v2))
|
||||
|
||||
|
||||
def verify_extensions(os):
|
||||
@ -62,8 +62,8 @@ def display_results(results):
|
||||
for option in NOVA_EXTENSIONS.keys():
|
||||
config_value = getattr(CONF.compute_feature_enabled, option)
|
||||
if config_value != results['nova_features'][option]:
|
||||
print "Config option: %s should be changed to: %s" % (
|
||||
option, not config_value)
|
||||
print("Config option: %s should be changed to: %s" % (
|
||||
option, not config_value))
|
||||
|
||||
|
||||
def main(argv):
|
||||
|
Loading…
x
Reference in New Issue
Block a user