diff --git a/basetheme_bootstrap/tests.py b/basetheme_bootstrap/tests.py index 75ea8df8f084b0fc9d35ec246a117a7579a0c336..8d14e70875f3252edc89f6cbe94b9626e974a3c0 100644 --- a/basetheme_bootstrap/tests.py +++ b/basetheme_bootstrap/tests.py @@ -1,3 +1,5 @@ +import os + from django.conf import settings from django.contrib.auth import get_user_model from django.core.cache import cache @@ -37,6 +39,26 @@ class SignUpTests(TestCase): self.assertEqual(get_user_model().objects.count(), user_count + 1) +class TestWithTemplatesInPlace(SignUpTests): + + def setUp(self): + super().setUp() + + def test_with_templates(self): + templates = [ + "test_app_1/templates/test_app_1/fork_me.html", + "test_app_1/templates/test_app_1/nav_bar.html", + "test_app_1/templates/test_app_1/last_update.html", + ] + + for t in templates: + open(t, 'a').close() + self.test_works() + self.test_sign_up_form_view() + for t in templates: + os.remove(t) + + class SuperuserSignUpTests(TestCase): def setUp(self):