def create_app(self): return create_app()
def create_app(self): os.environ["APP_SETTINGS"] = "middleware.config.TestingConfig" app = create_app() return app
assert ( comparisons_sorted_by_segment_id[i][j].reference_segment_id == j) # %% from middleware import create_app from middleware.models import db import os os.environ["APP_SETTINGS"] = "middleware.config.TestingConfig" os.environ[ 'DATABASE_URL'] = 'postgresql://*****:*****@db:5432/video_reuse_detector_test' os.environ[ 'DATABASE_TEST_URL'] = 'postgresql://*****:*****@db:5432/video_reuse_detector_test' app = create_app() client = app.test_client() def sorted_comparisons_to_iterable(sorted_comparisons): import itertools return list(itertools.chain(*sorted_comparisons.values())) def model_from_fingerprint_comparison(fpc): from middleware.models.fingerprint_comparison import FingerprintComparisonModel return FingerprintComparisonModel.from_fingerprint_comparison(fpc)