[openstack-dev] [horizon] Question about behavior of override_settings
Abishek Subramanian (absubram)
absubram at cisco.com
Thu Jun 19 17:46:20 UTC 2014
Hi,
This has to do with a patch I have out for review currently -
https://review.openstack.org/#/c/90093/
I believe version 5 to be the proper solution for the problem with the
unit tests that I am trying to fix.
However based on some comments that asked me to try a couple things,
version 7 is the latest one out but
I have a couple of questions regarding the behavior I am observing.
1. The diffs change the running of tests in admin/networks/tests.py -
A small snippet is this addition -
@override_settings(OPENSTACK_NEUTRON_NETWORK={'profile_support': None})
def test_network_create_get_with_no_profile(self):
self.test_network_create_get(test_with_profile=False)
This essentially defines a new UT which invokes an existing one but with
different settings.
This same patch for the similar project/networks/tests.py containing the
exact same test however does not work the same way.
It seems that the override_settings somehow finds fault with the
test.create_stubs of the base test.
I put this down to the possibly the definition of the test class itself.
In admin/networks it is - class NetworkTests(test.BaseAdminViewTests):
Whereas in project/networks it is - class NetworkTests(test.TestCase):
Anyone have any idea what the difference is between the two and also
why the BaseAdminViewTests would affect the settings differently?
Also would appreciate any further reviews on this.
Thanks!
Abishek
More information about the OpenStack-dev
mailing list