Skip to content

Commit

Permalink
Fixed #6825 -- Fixed the model_forms tests to also work on Windows by…
Browse files Browse the repository at this point in the history
… making

the filename detection a lot looser. Thanks, jerickso.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Mar 20, 2008
1 parent c0537a9 commit 463a03d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/modeltests/model_forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def __unicode__(self):
<class 'django.newforms.fields.UploadedFile'>
>>> instance = f.save()
>>> instance.file
u'.../test1.txt'
u'...test1.txt'
# Edit an instance that already has the file defined in the model. This will not
# save the file again, but leave it exactly as it is.
Expand All @@ -808,10 +808,10 @@ def __unicode__(self):
>>> f.is_valid()
True
>>> f.cleaned_data['file']
u'.../test1.txt'
u'...test1.txt'
>>> instance = f.save()
>>> instance.file
u'.../test1.txt'
u'...test1.txt'
# Delete the current file since this is not done by Django.
Expand All @@ -824,7 +824,7 @@ def __unicode__(self):
True
>>> instance = f.save()
>>> instance.file
u'.../test2.txt'
u'...test2.txt'
>>> instance.delete()
Expand All @@ -843,7 +843,7 @@ def __unicode__(self):
True
>>> instance = f.save()
>>> instance.file
u'.../test3.txt'
u'...test3.txt'
>>> instance.delete()
# ImageField ###################################################################
Expand All @@ -865,7 +865,7 @@ def __unicode__(self):
<class 'django.newforms.fields.UploadedFile'>
>>> instance = f.save()
>>> instance.image
u'.../test.png'
u'...test.png'
# Edit an instance that already has the image defined in the model. This will not
# save the image again, but leave it exactly as it is.
Expand All @@ -874,10 +874,10 @@ def __unicode__(self):
>>> f.is_valid()
True
>>> f.cleaned_data['image']
u'.../test.png'
u'...test.png'
>>> instance = f.save()
>>> instance.image
u'.../test.png'
u'...test.png'
# Delete the current image since this is not done by Django.
Expand All @@ -890,7 +890,7 @@ def __unicode__(self):
True
>>> instance = f.save()
>>> instance.image
u'.../test2.png'
u'...test2.png'
>>> instance.delete()
Expand All @@ -909,7 +909,7 @@ def __unicode__(self):
True
>>> instance = f.save()
>>> instance.image
u'.../test3.png'
u'...test3.png'
>>> instance.delete()
"""}

0 comments on commit 463a03d

Please sign in to comment.