def test_bind_af_unspecified_err(self):
        ac = Acceptor()
        with mock.patch.object(
                ac, "bind",
                side_effect=socket.error(errno.EBADF, "")) as m:
            self.assertRaises(socket.error,
                              ac.bind_af_unspecified, ("localhost", 0))
            assert m.called
            self.assertIsNone(ac.socket)