def test_share_not_accepted(self):
        """Shares that exist but are not accepted don't work."""
        self.r_share.accepted = False
        share_dao = SharedDirectory(self.r_share, by_user=self.sharer)
        self.assertRaises(errors.NoPermission,
                          ReadWriteVolumeGateway, self.user, share=share_dao)