Ignore:
Timestamp:
6 Jun 2011, 22:41:25 (14 years ago)
Author:
uli
Message:

Improve some applicants related tests: for setup register
IFileRetrieval, because otherwise stuff concerning
w.s.applicants.interfaces cannot be tested properly.

File:
1 edited

Legend:

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

    r5984 r6288  
    2525import unittest
    2626from StringIO import StringIO
    27 from zope.component import provideAdapter, adapts, getGlobalSiteManager
     27from hurry.file.file import IdFileRetrieval
     28from hurry.file.interfaces import IFileRetrieval
     29from zope.app.testing import placelesssetup
     30from zope.component import (
     31    provideAdapter, adapts, getGlobalSiteManager, provideUtility)
    2832from zope.component.interfaces import IFactory
    2933from zope.interface import verify, implements
     
    6872
    6973    def setUp(self):
     74        placelesssetup.setUp()
     75        provideUtility(IdFileRetrieval(), IFileRetrieval)
    7076        self.applicant = Applicant()
    7177
    7278    def tearDown(self):
     79        placelesssetup.tearDown()
    7380        pass
    7481
     
    104111        self.gsm = getGlobalSiteManager()
    105112        self.gsm.registerAdapter(FakeImageLocation)
     113        self.fileretrieval = IdFileRetrieval()
     114        provideUtility(self.fileretrieval, IFileRetrieval)
    106115        return
    107116
    108117    def tearDown(self):
    109118        self.gsm.unregisterAdapter(FakeImageLocation)
     119        self.gsm.unregisterUtility(self.fileretrieval, IFileRetrieval)
    110120        return
    111121
Note: See TracChangeset for help on using the changeset viewer.