Пример #1
0
def temp_db():
    db.create_all()
    try:
        yield db
    finally:
        db.session.remove()
        db.drop_all()
        r.flushdb()
Пример #2
0
def flush_db():
    r.flushdb()
Пример #3
0
    def teardown_method(self, method):
        self.fetch_detail_patch.stop()

        r.flushdb()
Пример #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()
Пример #5
0
 def teardown_method(self, method):
     r.flushdb()
Пример #6
0
 def teardown_method(self, method):
     self.get_listing_data_patch.stop()
     r.flushdb()
Пример #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()
Пример #8
0
    def teardown_method(self, method):
        self.get_treasuries_patch.stop()

        r.flushdb()
Пример #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()