Add a basic test

This commit is contained in:
Brian Duggan 2018-05-24 12:27:41 -04:00
parent 141fcb83a9
commit 487cb147bb
5 changed files with 23 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
node_modules
node_modules/
.sass-cache/
static/fonts/*
.webassets-cache
scss/assets
.pytest_cache/

5
.travis.yml Normal file
View File

@ -0,0 +1,5 @@
language: python
python:
- "3.6"
script:
- python -m pytest

2
pytest.ini Normal file
View File

@ -0,0 +1,2 @@
[pytest]
norecursedirs = .venv .git node_modules

View File

@ -1,2 +1,4 @@
tornado==5.0.2
webassets==0.12.1
pytest==3.6.0
pytest-tornado==0.5.0

12
tests/test_basic.py Normal file
View File

@ -0,0 +1,12 @@
import pytest
import tornado.web
from app import make_app
@pytest.fixture
def app():
return make_app()
@pytest.mark.gen_test
def test_hello_world(http_client, base_url):
response = yield http_client.fetch(base_url)
assert response.code == 200