Changeset 6524 for main/waeup.sirp/trunk


Ignore:
Timestamp:
15 Jul 2011, 10:40:51 (13 years ago)
Author:
uli
Message:

We are going to make WAeUPImageFiles relying on installed
IFileRetrieval utilities. Therefore we have to install one for the
tests of views.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/image/browser/tests/test_views.py

    r5924 r6524  
    2828from tempfile import mkstemp
    2929from hurry.file import HurryFile
     30from hurry.file.file import IdFileRetrieval
     31from hurry.file.interfaces import IFileRetrieval
    3032from waeup.sirp.image.browser.views import HurryFileView
    31 from zope.component import getMultiAdapter
     33from zope.component import getMultiAdapter, provideUtility
    3234from zope.publisher.browser import TestRequest
    3335
     
    5254
    5355    layer = ImageBrowserViewsLayer
    54    
     56
    5557    def setUp(self):
    5658        # Create a bunch of files and `HurryFile` objects pointing to
     
    6668            self.content_types[name] = content_type
    6769        self.request = TestRequest()
     70        # Now create the most simple fileretrieval possible
     71        retrieval = IdFileRetrieval()
     72        provideUtility(retrieval, IFileRetrieval)
    6873        return
    6974
     
    8691            content_type, self.content_types['jpg']
    8792            )
    88 
Note: See TracChangeset for help on using the changeset viewer.