def test_create_duplicate_key_pair(self):
        self.expect_http()
        self.mox.ReplayAll()
        keyname = "".join(random.choice("sdiuisudfsdcnpaqwertasd") \
                          for x in range(random.randint(4, 8)))
        # NOTE(vish): create depends on pool, so call helper directly
        self.ec2.create_key_pair('test')

        try:
            self.ec2.create_key_pair('test')
        except EC2ResponseError, e:
            if e.code == 'KeyPairExists':
                pass
            else:
                self.fail("Unexpected EC2ResponseError: %s "
                          "(expected KeyPairExists)" % e.code)
        else:
            self.fail('Exception not raised.')
Set the coordinate type for the axis.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_api.py/ApiEc2TestCase.test_create_duplicate_key_pair--crossover with--dataset/ETHPy150Open glue-viz/glue/glue/external/wcsaxes/coordinate_helpers.py/CoordinateHelper.set_coord_type