Ejemplo n.º 1
0
 def test_template_raises_exception_if_library_not_in_project(self):
     with self.assertRaisesRegexp(ValueError,
                                  'library staticfiles is not in project'):
         template_tag_library('staticfiles')
Ejemplo n.º 2
0
 def test_template_tag_library_works(self):
     self.assertIn(
         f'{GITHUB_TREE_URL}/styleguide/templatetags/styleguide.py',
         template_tag_library('styleguide'),
     )
Ejemplo n.º 3
0
 def test_template_raises_exception_if_library_not_found(self):
     with self.assertRaisesRegexp(ValueError, 'library blarg not found'):
         template_tag_library('blarg')