diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-06-26 03:16:55 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-06-26 03:16:55 +0000 |
| commit | 5dabaf30b6219d5f0365fe159d15c540b34055a3 (patch) | |
| tree | 013269e60a489a0aae5069325f918ea999aa3bdd /tests/regressiontests/datastructures | |
| parent | 915001ad0bd61600781d58ead798c8cae6e5cd25 (diff) | |
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
Diffstat (limited to 'tests/regressiontests/datastructures')
| -rw-r--r-- | tests/regressiontests/datastructures/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
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' + """ |
