From a138bc0c489b63a323b85fd428c03d8975189c44 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 20 May 2018 22:34:56 +0200 Subject: [PATCH] Start the test suite --- .travis.yml | 6 +++--- tests/integration_test.py | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tests/integration_test.py diff --git a/.travis.yml b/.travis.yml index 7fa43fd..3b33d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,11 @@ install: - sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - docker-compose --version - - pip install pytest mypy flake8 + - pip install -r dev-requirements.txt script: - mypy --ignore-missing-imports . +# - flake8 - cp -r tests/me.yml config/me.yml - docker-compose up -d - docker-compose ps -# - flake8 -# - pytest -v + - pytest -v --ignore data diff --git a/tests/integration_test.py b/tests/integration_test.py new file mode 100644 index 0000000..3595ca4 --- /dev/null +++ b/tests/integration_test.py @@ -0,0 +1,7 @@ +import requests + +def test_ping_homepage(): + """Ensure the homepage is accessible.""" + resp = requests.get('http://localhost:5005') + resp.raise_for_status() + assert 'ci@localhost' in resp.text