Add test_routes, which tests routes
This commit is contained in:
parent
610c5162cc
commit
133bc6fa86
23
tests/test_routes.py
Normal file
23
tests/test_routes.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import pytest
|
||||||
|
import tornado.web
|
||||||
|
from atst.app import make_app
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def app():
|
||||||
|
return make_app()
|
||||||
|
|
||||||
|
@pytest.mark.gen_test
|
||||||
|
def test_routes(http_client, base_url):
|
||||||
|
for path in (
|
||||||
|
'/',
|
||||||
|
'/home',
|
||||||
|
'/workspaces',
|
||||||
|
'/requests',
|
||||||
|
'/requests/new',
|
||||||
|
'/requests/new/1',
|
||||||
|
'/users',
|
||||||
|
'/reports',
|
||||||
|
'/calculator'
|
||||||
|
):
|
||||||
|
response = yield http_client.fetch(base_url + path)
|
||||||
|
assert response.code == 200
|
Loading…
x
Reference in New Issue
Block a user