Get test_openAuth_can_refuse_None_uri to cleanup after itself
test_openAuth_can_refuse_None_uri sets the global libvirt.allow_default_uri_connection to False but it leaves it in this state which could cause test_tpool_execute_calls_libvirt to fail if it ran immediately afterwards. This patch adds a cleanup so _reset is called at the end of the test and not just if another test in the same class is run after it. Change-Id: I9762fcb81b2318beeb056c67bd9172056e1449ab Closes-Bug: 1258553
This commit is contained in:
@@ -87,6 +87,7 @@ class FakeLibvirtTests(test.NoDBTestCase):
|
||||
def test_openAuth_can_refuse_None_uri(self):
|
||||
conn_method = self.get_openAuth_curry_func()
|
||||
libvirt.allow_default_uri_connection = False
|
||||
self.addCleanup(libvirt._reset)
|
||||
self.assertRaises(ValueError, conn_method, None)
|
||||
|
||||
def test_openAuth_refuses_invalid_URI(self):
|
||||
|
||||
Reference in New Issue
Block a user