]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ensure that Arista test destroys the database
authorMark McClain <mark.mcclain@dreamhost.com>
Wed, 4 Sep 2013 18:36:11 +0000 (14:36 -0400)
committerMark McClain <mark.mcclain@dreamhost.com>
Wed, 4 Sep 2013 18:36:11 +0000 (14:36 -0400)
Out of order test execution has revealed that the database was not
properly cleaned up after each test run.  This patch adds a call to
clear the database after each test.

Fixes bug: 1220784

Change-Id: I8a706887f89f21ede88177e441a3b562fd8f74dc

neutron/tests/unit/ml2/drivers/test_arista_mechanism_driver.py

index 431dc651062e64e54225c50123402bdfc0b76e51..5397f77b880945cf560be2e381f8e74c6bf215f9 100644 (file)
@@ -45,6 +45,7 @@ class AristaProvisionedVlansStorageTestCase(base.BaseTestCase):
     def setUp(self):
         super(AristaProvisionedVlansStorageTestCase, self).setUp()
         ndb.configure_db()
+        self.addCleanup(ndb.clear_db)
 
     def test_tenant_is_remembered(self):
         tenant_id = 'test'