예제 #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()