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:
parent
d45e39664a
commit
668e8c26ad
@ -16,7 +16,16 @@
|
||||
|
||||
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(
|
||||
db_connection='my favorite db_connection!',
|
||||
database='my favorite database!',
|
||||
|
Loading…
x
Reference in New Issue
Block a user