Revert "Only call create_all once"
Since this database is in memory there seems to be an interaction with
tox and how it sets up and runs tests. So let's just create it each time
This reverts commit b32284e787
.
Change-Id: I56be0354eae2028f50efe6d5e8034dcdb1766b54
This commit is contained in:
parent
4d7daaa32e
commit
4216d79ef1
|
@ -19,7 +19,6 @@ from sqlalchemy.orm import sessionmaker
|
|||
from oslo_utils import uuidutils
|
||||
from oslotest import base
|
||||
|
||||
CREATED = False
|
||||
|
||||
FAKE_SG_RULE = {'direction': 'INGRESS', 'protocol': 'tcp', 'ethertype': 'IPv6',
|
||||
'tenant_id': 'fake_tenant', 'port_range_min': 80,
|
||||
|
@ -47,11 +46,7 @@ class DbApiTestCase(base.BaseTestCase):
|
|||
def setUp(self):
|
||||
super(DbApiTestCase, self).setUp()
|
||||
self.context = ClassifierTestContext()
|
||||
|
||||
if not CREATED:
|
||||
models.Base.metadata.create_all(self.context.engine)
|
||||
global CREATED
|
||||
CREATED = True
|
||||
models.Base.metadata.create_all(self.context.engine)
|
||||
|
||||
def _create_classifier_group(self, service):
|
||||
cg = models.ClassifierGroup()
|
||||
|
|
Loading…
Reference in New Issue