def test_reject(self):
        """ reject request for approval (normal scenario)
        """
        content = self.root.test
        publisher = IPublicationWorkflow(content)
        publisher.request_approval('please approve')

        self.assertTrue(publisher.reject_request('u made a mistake'))
        self.assertFalse(content.is_approval_requested())

        with self.assertRaises(VersioningError):
            publisher.reject_request('u suck anyway')
    def test_reject_published(self):
        """ rejecting a published content must fail.
        """
        content = self.root.test
        publisher = IPublicationWorkflow(content)
        publisher.request_approval('please approve')

        publisher.publish()

        self.assertFalse(content.is_approval_requested())

        with self.assertRaises(VersioningError):
            publisher.reject_request('u suck anyway')