yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76526
[Bug 1472459] Re: Unit test leakage
*** This bug is a duplicate of bug 1806053 ***
https://bugs.launchpad.net/bugs/1806053
I think this was fixed as bug 1805240 and bug 1806053.
** This bug has been marked a duplicate of bug 1806053
APITestCase still needs to be patched utils.patch_middleware_get_user()
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1472459
Title:
Unit test leakage
Status in OpenStack Dashboard (Horizon):
Confirmed
Bug description:
Running a subset of the test suite via:
./run_tests.sh openstack_dashboard.test.api_tests
results in a rest error:
======================================================================
ERROR: test_url_for (openstack_dashboard.test.api_tests.base_tests.ApiHelperTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/richard/src/openstack/horizon/openstack_dashboard/test/api_tests/base_tests.py", line 192, in test_url_for
url = api_base.url_for(self.request, 'image')
File "/Users/richard/src/openstack/horizon/openstack_dashboard/api/base.py", line 311, in url_for
catalog = request.user.service_catalog
File "/Users/richard/src/openstack/horizon/.venv/lib/python2.7/site-packages/django/utils/functional.py", line 225, in inner
return func(self._wrapped, *args)
AttributeError: 'AnonymousUser' object has no attribute 'service_catalog'
----------------------------------------------------------------------
which goes away when the scope of the tests is raised up to:
./run_tests.sh openstack_dashboard.test
which implies the setup of the tests in some other part of Horizon is
causing a side-effect that's being relied upon in the api tests.
Update: this is reproducible in Pike by using:
tox -e p27 openstack_dashboard.test.api_tests
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1472459/+subscriptions
References