def test_should_remove_aop_from_journal(self):
        # add aop to journal
        self.request.validated = {"aop": "001"}
        restfulapi.patch_journal_aop(self.request)

        self.assertIsInstance(restfulapi.delete_journal_aop(self.request),
                              HTTPNoContent)
 def test_should_raise_exception_if_journal_does_not_has_aop(self):
     self.request.matchdict = {"journal_id": "1678-4596-cr-49-02"}
     self.request.services["set_ahead_of_print_bundle_to_journal"] = Mock(
         side_effect=exceptions.DoesNotExist())
     self.assertIsInstance(restfulapi.delete_journal_aop(self.request),
                           HTTPNotFound)