def test_012_can_create_instance_with_keypair(self):
        if 'instance_id' in self.data:
            self.conn.terminate_instances([self.data['instance_id']])
        reservation = self.conn.run_instances(FLAGS.test_image,
                                              key_name=TEST_KEY,
                                              instance_type='m1.tiny')
        self.assertEqual(len(reservation.instances), 1)
        self.data['instance_id'] = reservation.instances[0].id
dataset/ETHPy150Open nii-cloud/dodai-compute/smoketests/public_network_smoketests.py/InstanceTestsFromPublic.test_012_can_create_instance_with_keypair/original