[openstack-dev] [tempest] tearDownClass usage in scenario tests
Richard Winters (riwinter)
riwinter at cisco.com
Tue Dec 2 13:51:36 UTC 2014
I’ve noticed that in scenario tests only the OfficialClientTest in manager.py has a tearDownClass and was wondering if there is a reason for that?
In my scenario tests I need to ensure a particular connection gets closed after the test runs. This connection is setup in setUpClass so it makes sense to me that it should also be closed in the tearDownClass.
This is how I’m cleaning up now – but didn’t know if there is better way to do it.
@classmethod
def tearDownClass(cls):
super(TestCSROneNet, cls).tearDownClass()
if cls.nx_onep is not None:
cls.nx_onep.disconnect()
Thanks
Rich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141202/8ca167d0/attachment.html>
More information about the OpenStack-dev
mailing list