'Make sure that ValueError for setting an auth request
anonymous gets converted to a ProtocolError'

def test_beginWithoutDiscoveryAnonymousFail(self):

    sess = {}
    consumer = Consumer(sess, None)
    def bogusBegin(unused):
        return NonAnonymousAuthRequest()
    consumer.consumer.begin = bogusBegin
    self.failUnlessRaises(ProtocolError, consumer.beginWithoutDiscovery, None)
