diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2010-03-03 13:40:52 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2010-03-03 13:40:52 +0000 |
| commit | 0a0748a7d68ae01f99de2bfbbdd8441c1a0ecad2 (patch) | |
| tree | 0f6a014c71fc502b1da0caf4986b2fe330f7e21e | |
| parent | 4e65d73e9ee732883400fe444f2120c9b3757b1e (diff) | |
Fixed the files test to not care whether the names are reported as bytestrings or unicode. Refs #12898.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | tests/modeltests/files/models.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/modeltests/files/models.py b/tests/modeltests/files/models.py index 271fd8de9e..67c27b54b5 100644 --- a/tests/modeltests/files/models.py +++ b/tests/modeltests/files/models.py @@ -67,14 +67,14 @@ ValueError: The 'normal' attribute has no file associated with it. >>> dirs [] >>> files.sort() ->>> files -['default.txt', 'django_test.txt'] +>>> files == ['default.txt', 'django_test.txt'] +True >>> obj1.save() >>> dirs, files = temp_storage.listdir('tests') >>> files.sort() ->>> files -['assignment.txt', 'default.txt', 'django_test.txt'] +>>> files == ['assignment.txt', 'default.txt', 'django_test.txt'] +True # Files can be read in a little at a time, if necessary. @@ -113,13 +113,13 @@ ValueError: The 'normal' attribute has no file associated with it. # Multiple files with the same name get _N appended to them. ->>> objs = [Storage() for i in range(3)] ->>> for o in objs: -... o.normal.save('multiple_files.txt', ContentFile('Same Content')) +>>> objs = [Storage() for i in range(3)] +>>> for o in objs: +... o.normal.save('multiple_files.txt', ContentFile('Same Content')) >>> [o.normal for o in objs] [<FieldFile: tests/multiple_files.txt>, <FieldFile: tests/multiple_files_1.txt>, <FieldFile: tests/multiple_files_2.txt>] ->>> for o in objs: -... o.delete() +>>> for o in objs: +... o.delete() # Default values allow an object to access a single file. |
