Activate workflow on all branches

This commit is contained in:
Leigh Morresi
2021-02-27 09:05:25 +01:00
parent 468184bc3a
commit ec1ac300af
5 changed files with 52 additions and 40 deletions

View File

@@ -7,7 +7,6 @@ import os
# https://github.com/pallets/flask/blob/1.1.2/examples/tutorial/tests/test_auth.py
# Much better boilerplate than the docs
# https://www.python-boilerplate.com/py3+flask+pytest/
@@ -16,7 +15,6 @@ global app
@pytest.fixture(scope='session')
def app(request):
"""Create application for the tests."""
datastore_path = "./test-datastore"
try:
@@ -42,6 +40,16 @@ def app(request):
# This is fine in the case of a failure.
pass
@live_server.app.route('/test-endpoint')
def test_endpoint():
# Tried using a global var here but didn't seem to work, so reading from a file instead.
with open("test-datastore/output.txt", "r") as f:
return f.read()
live_server.start()
assert 1 == 1
request.addfinalizer(teardown)
return app
yield app