<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>plone.mocktestcase</name>
<shortdesc>Mock unit test case based on ``mocker``</shortdesc>
<description>Introduction
============

This package contains a unittest test class based on the one from the
``Mocker`` mock library (http://labix.org/mocker).

This class provides support for registering Zope 3 components (utilities,
adapters, subscription adapters and event handlers) from mocks and tearing 
down the global component registry during test tear-down.

There are also a few convenience methods and parameter checkers that are
useful to Zope and Plone testing.

Please see the Mocker documentation for more detail:

    http://labix.org/mocker

See testcase.py for more detail on the mock helper methods.

A test case that mocks a utility may look like this::

    from plone.mocktestcase import MockTestCase
    
    from my.package.interfaces import IMyInterface
    from my.package.foo import testable_method

    class MyTestCase(MockTestCase):
    
        def test_something(self):

            utility_mock = self.mocker.mock()
            self.expect(utility_mock.do_something()).result("foo")
            self.mock_utility(utility_mock, IMyInterface)
        
            # Put mocker into replay mode
            self.replay()
        
            # Verify that testable_method() looks up a utility for 
            # IMyInterface and calls do_something() on it, which returns
            # "foo".
        
            testable_method()

Changelog
=========

1.0b2
-----

* Minor amendments to mock Zope 3 component support

1.0b1
-----

* Initial release</description>
<homepage rdf:resource="http://plone.org" />
<maintainer><foaf:Person><foaf:name>Martin Aspeli</foaf:name>
<foaf:mbox_sha1sum>e9d69205eabc8d3443d474f8c6a26446c2541eb9</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.0b2</revision></Version></release>
</Project></rdf:RDF>