Skip to content

Commit

Permalink
Cover the code at 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
Fantomas42 committed Jul 18, 2014
1 parent 1236ede commit a5d049e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app_namespace/loader.py
Expand Up @@ -64,8 +64,7 @@ def load_template_source(self, template_name, template_dirs=None):
for app in self.app_templates_dirs:
try:
return self.load_template_source_inner(
template_name, app, template_path
)
template_name, app, template_path)
except TemplateDoesNotExist:
pass
raise TemplateDoesNotExist(template_name)
Expand Down
4 changes: 4 additions & 0 deletions app_namespace/tests/tests.py
Expand Up @@ -56,6 +56,10 @@ def test_load_template_source_empty_namespace(self):
template_namespace[1])
self.assertTrue('admin/base.html' in template_namespace[1])

self.assertRaises(TemplateDoesNotExist,
app_namespace_loader.load_template_source,
':template')

def test_dotted_namespace(self):
app_namespace_loader = Loader()

Expand Down

0 comments on commit a5d049e

Please sign in to comment.