mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 14:28:48 +00:00
fixed imports and tests
This commit is contained in:
parent
139fdd3472
commit
4b4979cf86
@ -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')
|
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 = FastAPI(title='FastAPI-DLS', description='Minimal Delegated License Service (DLS).', version=VERSION, **config)
|
||||||
app.mount('/static', StaticFiles(directory='static', html=True), name='static'),
|
app.mount('/static', StaticFiles(directory=join(dirname(__file__), 'static'), html=True), name='static'),
|
||||||
templates = Jinja2Templates(directory='templates')
|
templates = Jinja2Templates(directory=join(dirname(__file__), 'templates'))
|
||||||
|
|
||||||
db = create_engine(str(env('DATABASE', 'sqlite:///db.sqlite')))
|
db = create_engine(str(env('DATABASE', 'sqlite:///db.sqlite')))
|
||||||
db_init(db), migrate(db)
|
db_init(db), migrate(db)
|
||||||
|
@ -59,8 +59,8 @@ def test_readme():
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
def test_manage():
|
def test_dashboard():
|
||||||
response = client.get('/-/manage')
|
response = client.get('/-/dashboard')
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user