API: use of py.test as test runner

This commit is contained in:
Sam 2018-04-09 14:24:46 +02:00
parent a23643b24d
commit 2c5ad23f0c
3 changed files with 3 additions and 9 deletions

View File

@ -44,7 +44,7 @@ test-e2e:
$(NPM) test
test-python:
$(FLASK) test_local
$(PYTEST) mpwo_api
upgrade-db:
$(FLASK) db upgrade --directory $(MIGRATIONS)

View File

@ -42,16 +42,10 @@ def run_test(test_path='mpwo_api/tests'):
@app.cli.command()
def test(test_path='mpwo_api/tests'):
def test():
"""Runs the tests without code coverage."""
run_test()
@app.cli.command()
def test_local():
"""Runs the tests without code coverage in local machine w/ make."""
run_test('mpwo_api/mpwo_api/tests')
if __name__ == '__main__':
app.run()

View File

@ -8,7 +8,7 @@ inspect() {
fi
}
docker-compose -f docker-compose-ci.yml run mpwo-api flask test
docker-compose -f docker-compose-ci.yml run mpwo-api py.test mpwo_api
inspect $? api
testcafe chrome mpwo_client/e2e