def test_instance_type_create_then_delete(self):
        starting_inst_list = instance_types.get_all_types()
        instance_types.create(self.name, 256, 1, 120, self.flavorid)
        new = instance_types.get_all_types()
        self.assertNotEqual(len(starting_inst_list),
                            len(new),
                            'instance type was not created')
        instance_types.destroy(self.name)
        self.assertEqual(1,
                    instance_types.get_instance_type(self.id)["deleted"])
        self.assertEqual(starting_inst_list, instance_types.get_all_types())
        instance_types.purge(self.name)
        self.assertEqual(len(starting_inst_list),
                         len(instance_types.get_all_types()),
                         'instance type not purged')
create new project from default files
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_instance_types.py/InstanceTypeTestCase.test_instance_type_create_then_delete--crossover with--dataset/ETHPy150Open alexcepoi/pyscale/pyscale/tools/generators.py/new