diff --git a/Makefile b/Makefile deleted file mode 100644 index e4fb2f72..00000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -test: - python -m pytest - -clean: - find static/assets -type f |grep -v .gitignore | xargs rm diff --git a/README.md b/README.md index 4d3d6933..b8d5baed 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Installation - ./script/setup + script/setup The setup script will create a new Python virtual environment for the application to use. All of the scripts will activate this virutal envirnment automatically, but you can also manually activate it like this: @@ -21,22 +21,18 @@ If you want to automatically load the virtual environment whenever you enter the To start the app and watch for changes: - DEBUG=1 ./script/server + DEBUG=1 script/server ## Testing To run unit tests: - ./script/test + script/test or python -m pytest -or - - make test - ## Notes tornado templates are like mustache templates -- add the diff --git a/atst/app.py b/atst/app.py index 519ac1a2..2cba648c 100644 --- a/atst/app.py +++ b/atst/app.py @@ -7,12 +7,12 @@ from tornado.web import url def make_app(**kwargs): app = tornado.web.Application([ - url( r"/", MainHandler, {'page': 'login'}, name='login' ), + url( r"/", MainHandler, {'page': 'login'}, name='login' ), url( r"/home", MainHandler, {'page': 'home'}, name='home' ), - url( r"/workspaces", MainHandler, {'page': 'workspaces'}, name='workspaces' ), + url( r"/workspaces", MainHandler, {'page': 'workspaces'}, name='workspaces' ), url( r"/requests", Request, {'page': 'requests'}, name='requests' ), - url( r"/requests/new", RequestNew, {'page': 'requests_new'}, name='request_new' ), - url( r"/requests/new/([0-9])", RequestNew, {'page': 'requests_new'}, name='request_form' ), + url( r"/requests/new", RequestNew, {'page': 'requests_new'}, name='request_new' ), + url( r"/requests/new/([0-9])", RequestNew, {'page': 'requests_new'}, name='request_form' ), url( r"/users", MainHandler, {'page': 'users'}, name='users' ), url( r"/reports", MainHandler, {'page': 'reports'}, name='reports' ), url( r"/calculator", MainHandler, {'page': 'calculator'}, name='calculator' ), diff --git a/templates/workspaces.html.to b/templates/workspaces.html.to new file mode 100644 index 00000000..c6f4dbd0 --- /dev/null +++ b/templates/workspaces.html.to @@ -0,0 +1,34 @@ +{% extends "base.html.to" %} + +{% block content %} + +
+ +

Workspaces

+ + + + + + + + + + + + + + + + +
Workplace NameWorkplace InfoActions
+ Unclassified IaaS and PaaS for Defense Digital Service (DDS)
+ Task Order: #123456 +
+ 23
Users +
+ +
+ +{% end %} + diff --git a/tests/test_routes.py b/tests/test_routes.py new file mode 100644 index 00000000..c6f265b0 --- /dev/null +++ b/tests/test_routes.py @@ -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