diff --git a/app/main.py b/app/main.py index c0a4905..beb3aff 100644 --- a/app/main.py +++ b/app/main.py @@ -31,8 +31,8 @@ VERSION, COMMIT, DEBUG = env('VERSION', 'unknown'), env('COMMIT', 'unknown'), bo config = dict(openapi_url='/-/openapi.json', docs_url='/-/docs', redoc_url='/-/redoc') app = FastAPI(title='FastAPI-DLS', description='Minimal Delegated License Service (DLS).', version=VERSION, **config) -app.mount('/static', StaticFiles(directory='static', html=True), name='static'), -templates = Jinja2Templates(directory='templates') +app.mount('/static', StaticFiles(directory=join(dirname(__file__), 'static'), html=True), name='static'), +templates = Jinja2Templates(directory=join(dirname(__file__), 'templates')) db = create_engine(str(env('DATABASE', 'sqlite:///db.sqlite'))) db_init(db), migrate(db) diff --git a/test/main.py b/test/main.py index 67856c9..bc91f96 100644 --- a/test/main.py +++ b/test/main.py @@ -59,8 +59,8 @@ def test_readme(): assert response.status_code == 200 -def test_manage(): - response = client.get('/-/manage') +def test_dashboard(): + response = client.get('/-/dashboard') assert response.status_code == 200