Esempio n. 1
0
def temp_db():
    db.create_all()
    try:
        yield db
    finally:
        db.session.remove()
        db.drop_all()
        r.flushdb()
Esempio n. 2
0
def flush_db():
    r.flushdb()
Esempio n. 3
0
    def teardown_method(self, method):
        self.fetch_detail_patch.stop()

        r.flushdb()
Esempio n. 4
0
    def setup_method(self, method):
        self.fetch_detail_patch = patch('tasks.fetch_detail')
        self.fetch_detail = self.fetch_detail_patch.start()

        r.flushdb()
Esempio n. 5
0
 def teardown_method(self, method):
     r.flushdb()
Esempio n. 6
0
 def teardown_method(self, method):
     self.get_listing_data_patch.stop()
     r.flushdb()
Esempio n. 7
0
    def setup_method(self, method):
        r.flushdb()

        self.get_listing_data_patch = patch('tasks.get_listing_data')
        self.get_listing_data = self.get_listing_data_patch.start()
Esempio n. 8
0
    def teardown_method(self, method):
        self.get_treasuries_patch.stop()

        r.flushdb()
Esempio n. 9
0
    def setup_method(self, method):
        self.get_treasuries_patch = patch('tasks.get_treasuries')
        self.get_treasuries = self.get_treasuries_patch.start()
        self.get_treasuries.return_value = fake_treasuries()

        r.flushdb()