diff --git a/tests/regressiontests/test_client_regress/__init__.pyc b/tests/regressiontests/test_client_regress/__init__.pyc
new file mode 100644
index 0000000..c2f9068
Binary files /dev/null and b/tests/regressiontests/test_client_regress/__init__.pyc differ
diff --git a/tests/regressiontests/test_client_regress/models.py b/tests/regressiontests/test_client_regress/models.py
index 90383db..5021c03 100644
a
|
b
|
from django.core.exceptions import SuspiciousOperation
|
11 | 11 | from django.template import TemplateDoesNotExist, TemplateSyntaxError, Context |
12 | 12 | |
13 | 13 | class AssertContainsTests(TestCase): |
| 14 | def setUp(self): |
| 15 | self.old_templates = settings.TEMPLATE_DIRS |
| 16 | settings.TEMPLATE_DIRS = () |
| 17 | |
| 18 | def tearDown(self): |
| 19 | settings.TEMPLATE_DIRS = self.old_templates |
| 20 | |
14 | 21 | def test_contains(self): |
15 | 22 | "Responses can be inspected for content, including counting repeated substrings" |
16 | 23 | response = self.client.get('/test_client_regress/no_template_view/') |
… |
… |
class AssertContainsTests(TestCase):
|
57 | 64 | except AssertionError, e: |
58 | 65 | self.assertEquals(str(e), "Found 0 instances of 'thrice' in response (expected 3)") |
59 | 66 | |
| 67 | def test_unicode_contains(self): |
| 68 | #Regression test for #10183 |
| 69 | settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),) |
| 70 | r = self.client.get('/test_client_regress/check_unicode/') |
| 71 | self.assertContains(r, 'aa') |
| 72 | |
60 | 73 | class AssertTemplateUsedTests(TestCase): |
61 | 74 | fixtures = ['testdata.json'] |
62 | 75 | |
diff --git a/tests/regressiontests/test_client_regress/models.pyc b/tests/regressiontests/test_client_regress/models.pyc
new file mode 100644
index 0000000..80bdb59
Binary files /dev/null and b/tests/regressiontests/test_client_regress/models.pyc differ
diff --git a/tests/regressiontests/test_client_regress/templates/unicode.html b/tests/regressiontests/test_client_regress/templates/unicode.html
new file mode 100644
index 0000000..c5c1861
diff --git a/tests/regressiontests/test_client_regress/urls.py b/tests/regressiontests/test_client_regress/urls.py
index 0f9082d..c5872bf 100644
a
|
b
|
urlpatterns = patterns('',
|
22 | 22 | (r'^set_session/$', views.set_session_view), |
23 | 23 | (r'^check_session/$', views.check_session_view), |
24 | 24 | (r'^request_methods/$', views.request_methods_view), |
| 25 | (r'^check_unicode/$', views.return_unicode), |
25 | 26 | ) |
diff --git a/tests/regressiontests/test_client_regress/urls.pyc b/tests/regressiontests/test_client_regress/urls.pyc
new file mode 100644
index 0000000..a2cd644
Binary files /dev/null and b/tests/regressiontests/test_client_regress/urls.pyc differ
diff --git a/tests/regressiontests/test_client_regress/views.py b/tests/regressiontests/test_client_regress/views.py
index bd0b8af..75b8d88 100644
a
|
b
|
def check_session_view(request):
|
60 | 60 | def request_methods_view(request): |
61 | 61 | "A view that responds with the request method" |
62 | 62 | return HttpResponse('request method: %s' % request.method) |
| 63 | |
| 64 | def return_unicode(request): |
| 65 | return render_to_response('unicode.html') |