Skip to content

Commit

Permalink
test: module1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xp3p3x0 committed Sep 6, 2018
1 parent 7730781 commit 949df42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
.report.json

# Flask stuff:
instance/
Expand Down
5 changes: 1 addition & 4 deletions tests/test_module1.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ def test_app_create_flask_app_module1():
assert 'app' in dir(app), 'Have you created an instance of the `Flask` class called `app`?'
assert isinstance(app.app, app.Flask), '`app` is not an instance of the `Flask` class.'

@pytest.mark.test_templates_folder_module1
def test_templates_folder_module1():
assert os.path.isdir('jobs/templates'), 'The `templates` folder has not been created.'

@pytest.mark.test_index_template_module1
def test_index_template_module1():
assert os.path.isdir('jobs/templates'), 'The `templates` folder has not been created.'
assert template_exists('index'), 'The `index.html` template does not exist in the `templates` folder.'
assert template_find('index', 'h1', limit=1), "The `<h1>` in the `index.html` template does not contain the contents 'Jobs'."
assert template_find('index', 'h1', limit=1)[0].text == 'Jobs', "The `<h1>` in the `index.html` template does not contain the contents 'Jobs'."
Expand Down

0 comments on commit 949df42

Please sign in to comment.