From 6001ba016a3db4701d56abc6d30868d4e5d88dbf Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 9 Aug 2010 21:22:37 +0000 Subject: [soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflicts git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/test/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'django/test/utils.py') diff --git a/django/test/utils.py b/django/test/utils.py index b6ab39901b..404d130297 100644 --- a/django/test/utils.py +++ b/django/test/utils.py @@ -19,6 +19,12 @@ class ContextList(list): else: return super(ContextList, self).__getitem__(key) + def __contains__(self, key): + try: + value = self[key] + except KeyError: + return False + return True def instrumented_test_render(self, context): """ -- cgit v1.2.1