Changeset 5984


Ignore:
Timestamp:
26 Apr 2011, 11:20:42 (13 years ago)
Author:
uli
Message:

Fix this tests to cope with the modified w.s.image.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_applicants.py

    r5764 r5984  
    2525import unittest
    2626from StringIO import StringIO
    27 from zope.app.file.interfaces import IImage
    2827from zope.component import provideAdapter, adapts, getGlobalSiteManager
    2928from zope.component.interfaces import IFactory
     
    3332from zope.publisher.interfaces import NotFound
    3433from waeup.sirp.interfaces import IWAeUPSIRPPluggable
    35 from waeup.sirp.widgets.passportwidget import PassportImage
     34from waeup.sirp.image.image import WAeUPImageFile
     35from waeup.sirp.image.interfaces import IWAeUPImageFile
    3636from waeup.sirp.applicants import (
    3737    ResultEntry, Applicant, ApplicantFactory, ApplicantTraverser,
     
    4343class FakeImageLocation(object):
    4444    implements(ILocation)
    45     adapts(IImage)
     45    adapts(IWAeUPImageFile)
    4646    def __init__(self, context):
    4747        pass
     
    136136            self.applicant, self.request
    137137            )
    138         self.applicant.passport = PassportImage(None)
     138        self.applicant.passport = WAeUPImageFile('nofile.jpg', '')
    139139        self.applicant.passport.filename = 'mypic.jpg'
    140140        result = traverser.publishTraverse(self.request, 'passport.jpg')
     
    147147            self.applicant, self.request
    148148            )
    149         self.applicant.passport = PassportImage(None)
     149        self.applicant.passport = WAeUPImageFile('nofile.jpg', '')
    150150        self.applicant.passport.filename = 'mypic.jpg'
    151151        result = traverser.publishTraverse(self.request, 'mypic.jpg')
Note: See TracChangeset for help on using the changeset viewer.