@attr(migrated_tenant=['admin', 'tenant1', 'tenant2'])
    def test_tenant_key_exists_on_dst(self):
        """Validate deleted tenant's keypairs were migrated."""
        unused_keypairs = []
        for tenant_name, tenant in self.deleted_tenants:
            migrated_keys = \
                [key['name'] for key in config.keypairs if
                 key['user'] in
                 self._get_tenant_users_with_keypair(tenant_name)]
            keys_list = []
            for dst_vm in self.dst_vm_list:
                for src_vm in tenant['vms']:
                    if dst_vm.name == src_vm['name']:
                        if 'key_name' not in src_vm:
                            continue
                        if dst_vm.key_name == migrated_keys:
                            keys_list.append(dst_vm.key_name)
            if keys_list:
                unused_keypairs.append({tenant_name: keys_list})

        if unused_keypairs:
            msg = 'Tenant\'s key_pairs {0} exist on destination,' \
                  ' but should be deleted!'
            self.fail(msg.format(unused_keypairs))
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry_devlab/cloudferry_devlab/tests/testcases/test_verify_dst_del_tenant_resources.py/VerifyDstDeletedTenantResources.test_tenant_key_exists_on_dst/operator `not in` -> `==`