Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Apr 17, 2018
1 parent 42a661c commit 7dc4cd9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added tests/utils_test.py
Empty file.
31 changes: 31 additions & 0 deletions tests/web_test.py
@@ -0,0 +1,31 @@
#! ../env/bin/python3

import application
import pathlib


class TestWebApplication:
def setup_method(self):
"""
Creating a Flask app, and a bokeh resources path for each method of
the class.
"""
self.app, self.bokeh_resources = application.config.create_app()


def test_config(self):
"""
Tests if the config loads correctly.
"""
cwd = pathlib.Path.cwd()

assert self.app.config['DEBUG'] == False
assert self.app.import_name == 'application.config'
assert self.app.template_folder == 'templates'
assert self.app.static_folder == str(pathlib.Path(cwd, 'application', 'static'))
assert self.bokeh_resources == str(pathlib.Path('application', 'static', 'bokeh_templates'))


def test_index(self):
return None

21 changes: 0 additions & 21 deletions tests/webapp_tests.py

This file was deleted.

0 comments on commit 7dc4cd9

Please sign in to comment.