Fix database poison warnings, part 25
The following warning appears in the unit test logs a number of times. "UserWarning: This test uses methods that set internal oslo_db state, but it does not claim to use the database. This will conflict with the setup of tests that do use the database and cause failures later." This patch fixes the only 2 warnings in the functional tests. Note that this warning is only emitted once per unit test worker, so new offenders will show up in the logs each time you fix a test until they are all gone. Change-Id: I1bce7ef4222f1188c003d84ce42cd4755e9d8c24 Related-Bug: #1568414
This commit is contained in:
parent
fcc8263560
commit
1078ebd6c1
|
@ -81,6 +81,8 @@ class CellMappingTestCase(test.NoDBTestCase):
|
|||
|
||||
|
||||
class CellMappingListTestCase(test.NoDBTestCase):
|
||||
USES_DB_SELF = True
|
||||
|
||||
def setUp(self):
|
||||
super(CellMappingListTestCase, self).setUp()
|
||||
self.useFixture(fixtures.Database(database='api'))
|
||||
|
|
|
@ -125,6 +125,8 @@ class InstanceMappingTestCase(test.NoDBTestCase):
|
|||
|
||||
|
||||
class InstanceMappingListTestCase(test.NoDBTestCase):
|
||||
USES_DB_SELF = True
|
||||
|
||||
def setUp(self):
|
||||
super(InstanceMappingListTestCase, self).setUp()
|
||||
self.useFixture(fixtures.Database(database='api'))
|
||||
|
|
Loading…
Reference in New Issue