tests: fix unexisting method self.fail
self.fail doesn't exists in GabbitFixture. This change uses the correct exception. Change-Id: Iede4928caf35b8f4e3a9017252125d1b14489e18
This commit is contained in:
parent
4fd7d80706
commit
7be809e224
@ -16,6 +16,7 @@
|
|||||||
"""Fixtures used during Gabbi-based test runs."""
|
"""Fixtures used during Gabbi-based test runs."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import unittest
|
||||||
|
|
||||||
from gabbi import fixture
|
from gabbi import fixture
|
||||||
import mock
|
import mock
|
||||||
@ -60,7 +61,8 @@ class ConfigFixture(fixture.GabbiFixture):
|
|||||||
'AODH_TEST_STORAGE_URL', "").replace(
|
'AODH_TEST_STORAGE_URL', "").replace(
|
||||||
"mysql://", "mysql+pymysql://")
|
"mysql://", "mysql+pymysql://")
|
||||||
if not db_url:
|
if not db_url:
|
||||||
self.fail('No database connection configured')
|
raise unittest.TestCase.failureException(
|
||||||
|
'No database connection configured')
|
||||||
|
|
||||||
conf = service.prepare_service([], config_files=[])
|
conf = service.prepare_service([], config_files=[])
|
||||||
# NOTE(jd): prepare_service() is called twice: first by load_app() for
|
# NOTE(jd): prepare_service() is called twice: first by load_app() for
|
||||||
|
Loading…
x
Reference in New Issue
Block a user