Commit ce719e9c authored by katsel's avatar katsel
Browse files

Add basic tests

parent 0b303a16
from nose.tools import *
import flask
from resttime import *
app.config['TESTING'] = True
web = app.test_client()
def test_index():
# check that we get a 404 on the / URL
resp = web.get('/')
assert_equal(resp.status_code, 404)
# test that /time URL works (200 status and not empty)
resp = web.get('/time')
expected = 200
assert_equal(resp.status_code, expected), "Expected status %r is not %r" % (
expected, resp.status_code)
assert resp.data, "Response data is empty."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment