mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-14 22:13:02 +00:00
reorganization of tests (1 route per file), add some basic tests
This commit is contained in:
parent
00a6039289
commit
0874dc062e
6 changed files with 64 additions and 15 deletions
18
tests/test_api/conftest.py
Normal file
18
tests/test_api/conftest.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import sys
|
||||
import pytest
|
||||
|
||||
from app.app import create_app
|
||||
from app.main import get_args
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def app():
|
||||
sys.argv = ['']
|
||||
app = create_app(get_args())
|
||||
|
||||
yield app
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def client(app):
|
||||
return app.test_client()
|
Loading…
Add table
Add a link
Reference in a new issue