From 0065d8a120843e843ec139386fac9dd76d721079 Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Tue, 24 May 2011 21:33:32 +0000 Subject: [PATCH] Made expected output platform-independent in a test for the template postmortem debug 500 view so it doesn't fail under Windows. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16277 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/views/tests/debug.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/views/tests/debug.py b/tests/regressiontests/views/tests/debug.py index d77831122a..6dd4bd4934 100644 --- a/tests/regressiontests/views/tests/debug.py +++ b/tests/regressiontests/views/tests/debug.py @@ -1,4 +1,5 @@ import inspect +import os import sys from django.conf import settings @@ -56,7 +57,8 @@ class DebugViewTests(TestCase): def test_template_loader_postmortem(self): response = self.client.get(reverse('raises_template_does_not_exist')) - self.assertContains(response, 'templates/i_dont_exist.html (File does not exist)', status_code=500) + template_path = os.path.join('templates', 'i_dont_exist.html') + self.assertContains(response, template_path, status_code=500) class ExceptionReporterTests(TestCase):