Skip to content

Commit

Permalink
Updated Mod 3 Task 10 test
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah committed Jan 16, 2020
1 parent ae40e4b commit d640b70
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions module3/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,14 @@ def test_task9_url_reverser(self):
def test_task10_uncomment_templates(self):
# Remove `{% comment %}` and {% endcomment %} tags from
# `templates/mainapp/snippet_post_list.html` & `templates/mainapp/post.html`
filename = 'mainapp/templates/mainapp/snippet_post_list.html'
comment_found, endcomment_found = self.check_for_comments(filename)
filenames = ['mainapp/templates/mainapp/snippet_post_list.html',
'mainapp/templates/mainapp/post.html']

self.assertTrue(not comment_found, msg="There is still a `{% comment %}` tag in `" + filename + "`")
self.assertTrue(not endcomment_found, msg="There is still an `{% endcomment %}` tag in `" + filename + "`")
for filename in filenames:
comment_found, endcomment_found = self.check_for_comments(filename)

self.assertTrue(not comment_found, msg="There is still a `{% comment %}` tag in `" + filename + "`")
self.assertTrue(not endcomment_found, msg="There is still an `{% endcomment %}` tag in `" + filename + "`")

def test_task11_admin_register_tag(self):
# from .models import BlogPost, Tag
Expand Down

0 comments on commit d640b70

Please sign in to comment.