Skip to content

Commit

Permalink
Fixed the files test to not care whether the names are reported as by…
Browse files Browse the repository at this point in the history
…testrings or unicode. Refs #12898.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
kmtracey committed Mar 3, 2010
1 parent 4e65d73 commit 0a0748a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/modeltests/files/models.py
Expand Up @@ -67,14 +67,14 @@ def random_upload_to(self, filename):
>>> 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.
Expand Down Expand Up @@ -113,13 +113,13 @@ def random_upload_to(self, filename):
# 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.
Expand Down

0 comments on commit 0a0748a

Please sign in to comment.