Skip to content

Commit

Permalink
maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
SageTendo committed Dec 15, 2024
1 parent 32338e9 commit a68aabc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
31 changes: 19 additions & 12 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@
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)

Compress(app)

logging.basicConfig(format='%(asctime)s %(message)s')

def create_app():
load_dotenv()

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()


@app.route('/')
Expand Down
3 changes: 0 additions & 3 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
from dotenv import load_dotenv

load_dotenv()
4 changes: 2 additions & 2 deletions tests/routes/test_manifest.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import unittest

from run import app
from run import app, create_app


class TestManifestBlueprint(unittest.TestCase):
def setUp(self):
"""
Set up the test class
"""
self.client = app.test_client()
self.client = create_app().test_client()

def test_manifest(self):
"""
Expand Down

0 comments on commit a68aabc

Please sign in to comment.