Reset the globals parameters while testing parameters
(This way we can be sure that the database is torn down if necessary but this was the only test that passed last.)
This commit is contained in:
@@ -16,7 +16,16 @@
|
|||||||
|
|
||||||
from mediagoblin import mg_globals
|
from mediagoblin import mg_globals
|
||||||
|
|
||||||
def test_setup_globals():
|
class TestGlobals(object):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_connection = mg_globals.db_connection
|
||||||
|
self.old_database = mg_globals.database
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
mg_globals.db_connection = self.old_connection
|
||||||
|
mg_globals.database = self.old_database
|
||||||
|
|
||||||
|
def test_setup_globals(self):
|
||||||
mg_globals.setup_globals(
|
mg_globals.setup_globals(
|
||||||
db_connection='my favorite db_connection!',
|
db_connection='my favorite db_connection!',
|
||||||
database='my favorite database!',
|
database='my favorite database!',
|
||||||
|
|||||||
Reference in New Issue
Block a user