From 5dabaf30b6219d5f0365fe159d15c540b34055a3 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Thu, 26 Jun 2008 03:16:55 +0000 Subject: [PATCH] A forgotten file from [7743] (test the new DictWrapper class). git-svn-id: http://code.djangoproject.com/svn/django/trunk@7744 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/datastructures/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/regressiontests/datastructures/tests.py b/tests/regressiontests/datastructures/tests.py index b51b4b1233..d6141b09ce 100644 --- a/tests/regressiontests/datastructures/tests.py +++ b/tests/regressiontests/datastructures/tests.py @@ -125,4 +125,12 @@ Init from sequence of tuples >>> d = FileDict({'other-key': 'once upon a time...'}) >>> repr(d) "{'other-key': 'once upon a time...'}" + +### DictWrapper ############################################################# + +>>> f = lambda x: "*%s" % x +>>> d = DictWrapper({'a': 'a'}, f, 'xx_') +>>> "Normal: %(a)s. Modified: %(xx_a)s" % d +'Normal: a. Modified: *a' + """