From a0ef3ba2f7e815b4f3617f6e2827f66c13de3194 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 5 May 2007 03:03:33 +0000 Subject: [PATCH] Added a default test Client to TestCase, and added some assertions for some common testing patterns. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5150 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/test/testcases.py | 32 ++++++++++++++- docs/testing.txt | 54 ++++++++++++++++++++++---- tests/modeltests/test_client/models.py | 13 ++----- 3 files changed, 81 insertions(+), 18 deletions(-) diff --git a/django/test/testcases.py b/django/test/testcases.py index 2bfb9a733a..efe392590f 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -1,8 +1,10 @@ import re, doctest, unittest +from urlparse import urlparse from django.db import transaction from django.core import management from django.db.models import get_apps - +from django.test.client import Client + normalize_long_ints = lambda s: re.sub(r'(?