Created
September 28, 2012 16:19
Revisions
-
prestontimmons revised this gist
Oct 18, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,5 +18,6 @@ def setUp(self): def tearDown(self): restore_template_loaders() @override_settings(LOGIN_URL="/login/") def test_view(self): request = RequestFactory().get("/") -
prestontimmons revised this gist
Sep 28, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ from django.template import Template from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import ( -
prestontimmons created this gist
Sep 28, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import ( setup_test_template_loader, restore_template_loaders, override_settings, ) class TemplateTest(TestCase): def setUp(self): templates = { "template.html": Template("content here"), } setup_test_template_loader(templates) def tearDown(self): restore_template_loaders() def test_view(self): request = RequestFactory().get("/")