by johnpaulett · 15y ago · 0 comments
connection[app.config['MONGODB_DATABASE']].mycollection.find_one()
The unittest code just modifies the setting: import unittest
def setUp(self):
myapp.app.config['MONGODB_DATABASE'] = 'test'
self.app = myapp.app.test_client()
def tearDown(self):
# can clean up here, e.g.
connection.test.drop_collection('mycollection')