• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. Building and Storing Annotat... > Step 5: Writing Functional Tests and...

Step 5: Writing Functional Tests and Configuration

Functional tests are very important for this package because you do not know whether you thought of all exceptions until you test the keeper annotations code in a fully running Zope 3 environment. In a running Zope 3 setup, you cannot use File as a test object anymore because it already implements IAttributeAnnotable. Instead, you can use the KeeperFile class, which inherits from File and register it separately. In a new file named ftests.py, you add the new content type:

01 from zope.app.file import File
02
03 class KeeperFile(File):
04     pass


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint