def test_test_and_test_failure(self):
        """ Exception will be raised if prevValue != value in test_set """

        client = etcd.Client()
        client.api_execute = mock.Mock(
            side_effect=ValueError(
                'The given PrevValue is not equal'
                ' to the value of the key : TestAndSet: 1!=3'))
        try:
            result = client.test_and_set(
                '/testkey',
                'newvalue',
                'test', ttl=19)
        except __HOLE__ as e:
            #from ipdb import set_trace; set_trace()
            self.assertEquals(
                'The given PrevValue is not equal'
                ' to the value of the key : TestAndSet: 1!=3', str(e))
dataset/ETHPy150Open jplana/python-etcd/src/etcd/tests/unit/test_old_request.py/TestClientRequest.test_test_and_test_failure