def METHOD_NAME(self):
    reactor = Mock()
    with self.assertRaises(Exception) as ctx:
        yield tor_agent(reactor, None)
    self.assertTrue('Must provide socks_endpoint' in str(ctx.exception))