"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openstack_dashboard/test/helpers.py" between
horizon-14.0.2.tar.gz and horizon-14.0.3.tar.gz

About: OpenStack Horizon (Optional Service: Dashboard) provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
The "Rocky" series (maintained release).

helpers.py  (horizon-14.0.2):helpers.py  (horizon-14.0.3)
skipping to change at line 491 skipping to change at line 491
# NOTE: This test class depends on mox but does not declare use_mox = True # NOTE: This test class depends on mox but does not declare use_mox = True
# to notify mox is no longer recommended. # to notify mox is no longer recommended.
# If a consumer would like to use this class, declare use_mox = True. # If a consumer would like to use this class, declare use_mox = True.
def setUp(self): def setUp(self):
super(APITestCase, self).setUp() super(APITestCase, self).setUp()
LOG.warning("APITestCase has been deprecated in favor of mock usage " LOG.warning("APITestCase has been deprecated in favor of mock usage "
"and will be removed at the beginning of 'Stein' release. " "and will be removed at the beginning of 'Stein' release. "
"Please convert your to use APIMockTestCase instead.") "Please convert your to use APIMockTestCase instead.")
utils.patch_middleware_get_user()
def fake_keystoneclient(request, admin=False): def fake_keystoneclient(request, admin=False):
"""Returns the stub keystoneclient. """Returns the stub keystoneclient.
Only necessary because the function takes too many arguments to Only necessary because the function takes too many arguments to
conveniently be a lambda. conveniently be a lambda.
""" """
return self.stub_keystoneclient() return self.stub_keystoneclient()
def fake_glanceclient(request, version='1'): def fake_glanceclient(request, version='1'):
skipping to change at line 609 skipping to change at line 610
None, None,
preauthtoken=mox.IgnoreArg(), preauthtoken=mox.IgnoreArg(),
preauthurl=mox.IgnoreArg(), preauthurl=mox.IgnoreArg(),
cacert=None, cacert=None,
insecure=False, insecure=False,
auth_version="2.0") \ auth_version="2.0") \
.AndReturn(self.swiftclient) .AndReturn(self.swiftclient)
expected_calls -= 1 expected_calls -= 1
return self.swiftclient return self.swiftclient
# NOTE(adriant): APIMockTestCase was only needed for some openstack_auth class APIMockTestCase(TestCase):
# monkeypatching. With the new monkeypatch middleware from openstack_auth this
# is not needed. This class is used by horizon plugins, so we cannot drop it. def setUp(self):
APIMockTestCase = TestCase super(APIMockTestCase, self).setUp()
utils.patch_middleware_get_user()
# Need this to test both Glance API V1 and V2 versions # Need this to test both Glance API V1 and V2 versions
class ResetImageAPIVersionMixin(object): class ResetImageAPIVersionMixin(object):
def setUp(self): def setUp(self):
super(ResetImageAPIVersionMixin, self).setUp() super(ResetImageAPIVersionMixin, self).setUp()
api.glance.VERSIONS.clear_active_cache() api.glance.VERSIONS.clear_active_cache()
def tearDown(self): def tearDown(self):
api.glance.VERSIONS.clear_active_cache() api.glance.VERSIONS.clear_active_cache()
super(ResetImageAPIVersionMixin, self).tearDown() super(ResetImageAPIVersionMixin, self).tearDown()
 End of changes. 2 change blocks. 
4 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)