Example #1
0
 def test_template_tags_same_library_in_installed_apps_libraries(self):
     with self.settings(TEMPLATES=[
             self.get_settings("same_tags",
                               "same_tags_app_1.templatetags.same_tags"),
     ]):
         self.assertEqual(check_for_template_tags_with_the_same_name(None),
                          [])
Example #2
0
 def test_template_tags_with_different_library_name(self):
     with self.settings(TEMPLATES=[
             self.get_settings("same_tags",
                               "same_tags_app_1.templatetags.same_tags"),
             self.get_settings("not_same_tags",
                               "same_tags_app_2.templatetags.same_tags"),
     ]):
         self.assertEqual(check_for_template_tags_with_the_same_name(None),
                          [])
Example #3
0
 def test_template_tags_with_same_library_name(self):
     with self.settings(TEMPLATES=[
         self.get_settings('same_tags', 'same_tags_app_1.templatetags.same_tags'),
         self.get_settings('same_tags', 'same_tags_app_2.templatetags.same_tags'),
     ]):
         self.assertEqual(
             check_for_template_tags_with_the_same_name(None),
             [self.error_same_tags],
         )
Example #4
0
 def test_template_tags_with_same_library_name_and_module_name(self):
     with self.settings(TEMPLATES=[
         self.get_settings(
             'same_tags',
             'different_tags_app.templatetags.different_tags',
         ),
     ]):
         self.assertEqual(check_for_template_tags_with_the_same_name(None), [Error(
             E003.msg.format(
                 "'same_tags'",
                 "'check_framework.template_test_apps.different_tags_app."
                 "templatetags.different_tags', "
                 "'check_framework.template_test_apps.same_tags_app_1."
                 "templatetags.same_tags'",
             ),
             id=E003.id,
         )])
Example #5
0
 def test_template_tags_with_different_name(self):
     self.assertEqual(check_for_template_tags_with_the_same_name(None), [])
Example #6
0
 def test_template_tags_with_same_name(self):
     self.assertEqual(
         check_for_template_tags_with_the_same_name(None),
         [self.error_same_tags],
     )