class FlaskMongoTestCase(unittest.TestCase):
    def setUp(self):
        app.config['TESTING'] = True
        self.raw_app = app
        self.app = app.test_client()
        self.db = Connection(app.config['MONGODB_HOST'], app.config['MONGODB_PORT'])[app.config['MONGODB_DATABASE']]

    def tearDown(self):
        self.db.drop_collection("runs")
class FlaskMongoTestCase(unittest.TestCase):
    def setUp(self):
        app.config['TESTING'] = True
        self.app = app.test_client()
        self.db = Connection(app.config['MONGODB_HOST'], app.config['MONGODB_PORT'])[app.config['MONGODB_DATABASE']]
        with self.app.session_transaction() as sess:
            sess['user_email'] = u'*****@*****.**'

    def tearDown(self):
        self.db.drop_collection("capability")
        self.db.drop_collection("diel")
        self.db.drop_collection("taxis")
        self.db.drop_collection("lifestage")
        self.db.drop_collection("libraries")
        self.db.drop_collection("users")
Example #3
0
class FlaskMongoTestCase(unittest.TestCase):
    def setUp(self):
        app.config['TESTING'] = True
        self.raw_app = app
        self.app = app.test_client()
        self.db = Connection(
            app.config['MONGODB_HOST'],
            app.config['MONGODB_PORT'])[app.config['MONGODB_DATABASE']]

    def tearDown(self):
        self.db.drop_collection("services")
        self.db.drop_collection("stats")
        self.db.drop_collection("datasets")