diff --git a/backend/manage.py b/backend/manage.py index b972b77..8109f69 100644 --- a/backend/manage.py +++ b/backend/manage.py @@ -76,6 +76,8 @@ manager.add_command('checkdb', CheckDB()) class RunTests(Command): """Seed the db """ def run(self): + if not args.test: + raise Exception("Les tests doivent etre lancés en config de test") test_loader = unittest.defaultTestLoader test_runner = unittest.TextTestRunner() test_suite = test_loader.discover('tests') diff --git a/backend/requirements/common.txt b/backend/requirements/common.txt index 6325466..ba02b3f 100644 --- a/backend/requirements/common.txt +++ b/backend/requirements/common.txt @@ -4,4 +4,4 @@ flask-sqlalchemy < 2.2 flask-restful < 0.4 mysqlclient < 1.4 pdfjinja < 1.1 -python-pypdf2 < 1.27 +pypdf2 diff --git a/backend/tox.ini b/backend/tox.ini index 3b613fb..87ff2a7 100644 --- a/backend/tox.ini +++ b/backend/tox.ini @@ -6,7 +6,7 @@ exclude = .git, app/static, app/templates, tox.ini skipsdist = True [testenv] -commands = coverage run --source app/api,app/tools manage.py -t runtests +commands = coverage run --source app/api,app/tools --omit app/api/exampleapi.py manage.py -t runtests coverage report -m coverage xml coverage html