Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Jun 4, 2020
1 parent 44aed8d commit ba5ff73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/server_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def test_404(self):
def test_api_404(self):
self._test_404('/api/foo')

def test_root_redirect(self):
response = self.fetch("/", follow_redirects=False)
self.assertEqual(response.code, 302)
self.assertEqual(response.headers['Location'], 'static/visualiser/index.html') # assert that doesnt beging with leading slash !

def test_api_preflight_cors_headers(self):
response = self.fetch('/api/graph', method='OPTIONS', headers={'Origin': 'foo'})
headers = dict(response.headers)
Expand Down

0 comments on commit ba5ff73

Please sign in to comment.