refactor: Rename TestSuite to TestBase

Also updates bin/marconi-self-host to use Bootstrap, not Kernel.
Also fixes rebase issues

Change-Id: Ie68f6f9765bb4763fba031a709483301f98fa72c
Trello: #102
This commit is contained in:
kgriffs 2013-03-19 14:35:06 -04:00
parent 258c492eca
commit d7a97a5d6a
10 changed files with 20 additions and 19 deletions

View File

@ -18,12 +18,12 @@
"""Bootstrap for self-hosting a Marconi node """Bootstrap for self-hosting a Marconi node
Alternatively, to host a WSGI app with an external server, configure Alternatively, to host a WSGI app with an external server, configure
kernel with the WSGI transport and export the WSGI app callable, e.g.: bootstrap with the WSGI transport and export the WSGI app callable, e.g.:
logging.config.fileConfig(logging_conf_file) logging.config.fileConfig(logging_conf_file)
kernel = Kernel(conf_file) boot = Bootstrap(conf_file)
app = kernel.transport.app app = boot.transport.app
""" """

View File

@ -15,7 +15,7 @@
# Import guard. No module level import during the setup procedure. # Import guard. No module level import during the setup procedure.
try: try:
__MARCONI_SETUP__ __MARCONI_SETUP__ # NOQA
except NameError: except NameError:
import gettext import gettext
gettext.install("marconi", unicode=1) gettext.install("marconi", unicode=1)

View File

@ -15,10 +15,10 @@
from marconi import storage from marconi import storage
from marconi.tests.util import suite from marconi.tests import util as testing
class ControllerBaseTest(suite.TestSuite): class ControllerBaseTest(testing.TestBase):
tenant = "tenant" tenant = "tenant"
driver_class = None driver_class = None
controller_class = None controller_class = None

View File

@ -15,7 +15,7 @@
from marconi import storage from marconi import storage
from marconi.tests.util import suite from marconi.tests import util as testing
class Driver(storage.DriverBase): class Driver(storage.DriverBase):
@ -56,7 +56,7 @@ class QueueController(storage.QueueBase):
marker=marker, limit=limit) marker=marker, limit=limit)
class TestQueueBase(suite.TestSuite): class TestQueueBase(testing.TestBase):
def setUp(self): def setUp(self):
super(TestQueueBase, self).setUp() super(TestQueueBase, self).setUp()

View File

@ -19,13 +19,13 @@ from marconi.common import config
from marconi.storage import mongodb from marconi.storage import mongodb
from marconi.storage.mongodb import controllers from marconi.storage.mongodb import controllers
from marconi.tests.storage import base from marconi.tests.storage import base
from marconi.tests.util import suite from marconi.tests import util as testing
cfg = config.namespace("drivers:storage:mongodb").from_options() cfg = config.namespace("drivers:storage:mongodb").from_options()
class MongodbDriverTest(suite.TestSuite): class MongodbDriverTest(testing.TestBase):
def setUp(self): def setUp(self):
if not os.environ.get("MONGODB_TEST_LIVE"): if not os.environ.get("MONGODB_TEST_LIVE"):

View File

@ -16,7 +16,7 @@
import testtools import testtools
from marconi.common import config from marconi.common import config
from marconi.tests.util import suite from marconi.tests import util as testing
cfg_handle = config.project() cfg_handle = config.project()
@ -25,7 +25,7 @@ cfg = cfg_handle.from_options(
with_help=(None, "nonsense")) with_help=(None, "nonsense"))
class TestConfig(suite.TestSuite): class TestConfig(testing.TestBase):
def test_cli(self): def test_cli(self):
args = ['--with_help', 'sense'] args = ['--with_help', 'sense']

View File

@ -13,15 +13,15 @@
# under the License. # under the License.
import marconi import marconi
from marconi.tests.util import suite from marconi.tests import util as testing
class TestSimple(suite.TestSuite): class TestSimple(testing.TestBase):
def test_simple(self): def test_simple(self):
"""Doesn't really test much.""" """Doesn't really test much."""
conf_file = self.conf_path('wsgi_reference.conf') conf_file = self.conf_path('wsgi_reference.conf')
boot = marconi.Bootstrap(conf_file) boot = marconi.Bootstrap(conf_file)
transport = boot.transport transport = boot.transport
wsgi_app = transport.app wsgi_app = transport.app # NOQA
self.assertTrue(True) self.assertTrue(True)

View File

@ -17,10 +17,10 @@ import testtools
from marconi.storage import exceptions from marconi.storage import exceptions
from marconi.storage import sqlite from marconi.storage import sqlite
from marconi.tests.util import suite from marconi.tests import util as testing
class TestSqlite(suite.TestSuite): class TestSqlite(testing.TestBase):
def test_sqlite(self): def test_sqlite(self):
storage = sqlite.Driver() storage = sqlite.Driver()

View File

@ -1 +1,3 @@
"""Test utilities""" """Test utilities"""
from marconi.tests.util.base import TestBase # NOQA

View File

@ -16,14 +16,13 @@
import os import os
import testtools import testtools
from marconi.common import config from marconi.common import config
cfg = config.project() cfg = config.project()
class TestSuite(testtools.TestCase): class TestBase(testtools.TestCase):
""" """
Child class of testtools.TestCase for testing Marconi Child class of testtools.TestCase for testing Marconi