Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed the files test to not care whether the names are reported as by…

…testrings or unicode. Refs #12898.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0a0748a7d68ae01f99de2bfbbdd8441c1a0ecad2 1 parent 4e65d73
Karen Tracey authored

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. 18  tests/modeltests/files/models.py
18  tests/modeltests/files/models.py
@@ -67,14 +67,14 @@ def random_upload_to(self, filename):
67 67
 >>> dirs
68 68
 []
69 69
 >>> files.sort()
70  
->>> files
71  
-['default.txt', 'django_test.txt']
  70
+>>> files == ['default.txt', 'django_test.txt']
  71
+True
72 72
 
73 73
 >>> obj1.save()
74 74
 >>> dirs, files = temp_storage.listdir('tests')
75 75
 >>> files.sort()
76  
->>> files
77  
-['assignment.txt', 'default.txt', 'django_test.txt']
  76
+>>> files == ['assignment.txt', 'default.txt', 'django_test.txt']
  77
+True
78 78
 
79 79
 # Files can be read in a little at a time, if necessary.
80 80
 
@@ -113,13 +113,13 @@ def random_upload_to(self, filename):
113 113
 
114 114
 # Multiple files with the same name get _N appended to them.
115 115
 
116  
->>> objs = [Storage() for i in range(3)] 
117  
->>> for o in objs:  
118  
-...     o.normal.save('multiple_files.txt', ContentFile('Same Content')) 
  116
+>>> objs = [Storage() for i in range(3)]
  117
+>>> for o in objs:
  118
+...     o.normal.save('multiple_files.txt', ContentFile('Same Content'))
119 119
 >>> [o.normal for o in objs]
120 120
 [<FieldFile: tests/multiple_files.txt>, <FieldFile: tests/multiple_files_1.txt>, <FieldFile: tests/multiple_files_2.txt>]
121  
->>> for o in objs: 
122  
-...     o.delete() 
  121
+>>> for o in objs:
  122
+...     o.delete()
123 123
 
124 124
 # Default values allow an object to access a single file.
125 125
 

0 notes on commit 0a0748a

Please sign in to comment.
Something went wrong with that request. Please try again.