From 99892044c418f14943b6066fe8129f961829e940 Mon Sep 17 00:00:00 2001 From: Nyasha Zishiri <23294558@sun.ac.za> Date: Sun, 15 Dec 2024 23:26:07 +0200 Subject: [PATCH] test --- run.py | 28 ++++++++++------------------ tests/routes/test_manifest.py | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/run.py b/run.py index 51804d9..d62edc3 100644 --- a/run.py +++ b/run.py @@ -1,6 +1,5 @@ import logging -from dotenv import load_dotenv from flask import Flask, render_template, session, url_for, redirect from flask_compress import Compress @@ -12,25 +11,18 @@ from app.routes.stream import stream_bp from config import Config +app = Flask(__name__, template_folder='./templates', static_folder='./static') +app.config.from_object('config.Config') +app.register_blueprint(auth_blueprint) +app.register_blueprint(manifest_blueprint) +app.register_blueprint(catalog_bp) +app.register_blueprint(meta_bp) +app.register_blueprint(content_sync_bp) +app.register_blueprint(stream_bp) -def create_app(): - load_dotenv() +Compress(app) - app = Flask(__name__, template_folder='./templates', static_folder='./static') - app.config.from_object('config.Config') - app.register_blueprint(auth_blueprint) - app.register_blueprint(manifest_blueprint) - app.register_blueprint(catalog_bp) - app.register_blueprint(meta_bp) - app.register_blueprint(content_sync_bp) - app.register_blueprint(stream_bp) - - Compress(app) - logging.basicConfig(format='%(asctime)s %(message)s') - return app - - -app = create_app() +logging.basicConfig(format='%(asctime)s %(message)s') @app.route('/') diff --git a/tests/routes/test_manifest.py b/tests/routes/test_manifest.py index 632c40b..84900f6 100644 --- a/tests/routes/test_manifest.py +++ b/tests/routes/test_manifest.py @@ -8,7 +8,7 @@ def setUp(self): """ Set up the test class """ - self.client = create_app().test_client() + self.client = app.test_client() def test_manifest(self): """