From 95d628b2f68871a9a2aaebb617cccae2c41af196 Mon Sep 17 00:00:00 2001 From: Cunliang Geng Date: Wed, 13 Mar 2024 18:12:26 +0100 Subject: [PATCH] fix failed tests caused by the new version of jsonschema --- tests/schemas/test_genome_bgc_mappings_schema.py | 8 ++++---- tests/schemas/test_genome_status_schema.py | 4 ++-- tests/schemas/test_strain_mappings_schema.py | 8 ++++---- tests/schemas/test_user_strains_schema.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/schemas/test_genome_bgc_mappings_schema.py b/tests/schemas/test_genome_bgc_mappings_schema.py index 7f63a30f..4617558c 100644 --- a/tests/schemas/test_genome_bgc_mappings_schema.py +++ b/tests/schemas/test_genome_bgc_mappings_schema.py @@ -52,13 +52,13 @@ "data, expected", [ [data_no_mappings, "'mappings' is a required property"], - [data_empty_mappings, "[] is too short"], + [data_empty_mappings, "[] should be non-empty"], [data_no_genome_id, "'genome_ID' is a required property"], - [data_empty_genome_id, "'' is too short"], + [data_empty_genome_id, "'' should be non-empty"], [data_invalid_genome_id, "1 is not of type 'string'"], [data_no_bgc_id, "'BGC_ID' is a required property"], - [data_empty_bgc_id_list, "[] is too short"], - [data_empty_bgc_id, "'' is too short"], + [data_empty_bgc_id_list, "[] should be non-empty"], + [data_empty_bgc_id, "'' should be non-empty"], [data_invalid_bgc_id, "1 is not of type 'string'"], [data_duplicate_bgc_id, "['bgc1', 'bgc1'] has non-unique elements"], [data_no_version, "'version' is a required property"], diff --git a/tests/schemas/test_genome_status_schema.py b/tests/schemas/test_genome_status_schema.py index 22e9129a..cdea276f 100644 --- a/tests/schemas/test_genome_status_schema.py +++ b/tests/schemas/test_genome_status_schema.py @@ -108,9 +108,9 @@ "data, expected", [ [data_no_genome_status, "'genome_status' is a required property"], - [data_empty_genome_status, "[] is too short"], + [data_empty_genome_status, "[] should be non-empty"], [data_no_original_id, "'original_id' is a required property"], - [data_empty_original_id, "'' is too short"], + [data_empty_original_id, "'' should be non-empty"], [data_invalid_original_id, "1 is not of type 'string'"], [data_no_resolved_refseq_id, "'resolved_refseq_id' is a required property"], [data_invalid_resolved_refseq_id, "1 is not of type 'string'"], diff --git a/tests/schemas/test_strain_mappings_schema.py b/tests/schemas/test_strain_mappings_schema.py index 7ca5c770..5a45f979 100644 --- a/tests/schemas/test_strain_mappings_schema.py +++ b/tests/schemas/test_strain_mappings_schema.py @@ -63,13 +63,13 @@ "data, expected", [ [data_no_mappings, "'strain_mappings' is a required property"], - [data_empty_mappings, "[] is too short"], + [data_empty_mappings, "[] should be non-empty"], [data_no_strain_id, "'strain_id' is a required property"], - [data_empty_strain_id, "'' is too short"], + [data_empty_strain_id, "'' should be non-empty"], [data_invalid_strain_id, "1 is not of type 'string'"], [data_no_strain_alias, "'strain_alias' is a required property"], - [data_empty_strain_alias_list, "[] is too short"], - [data_empty_strain_alias, "'' is too short"], + [data_empty_strain_alias_list, "[] should be non-empty"], + [data_empty_strain_alias, "'' should be non-empty"], [data_invalid_strain_alias, "1 is not of type 'string'"], [data_duplicate_strain_alias, "['alias1', 'alias1'] has non-unique elements"], [data_no_version, "'version' is a required property"], diff --git a/tests/schemas/test_user_strains_schema.py b/tests/schemas/test_user_strains_schema.py index d14ea300..75044f80 100644 --- a/tests/schemas/test_user_strains_schema.py +++ b/tests/schemas/test_user_strains_schema.py @@ -16,7 +16,7 @@ "data, expected", [ [data_no_strain_ids, "'strain_ids' is a required property"], - [data_empty_strain_ids, "[] is too short"], + [data_empty_strain_ids, "[] should be non-empty"], [data_invalid_strain_ids, "1 is not of type 'string'"], [data_empty_version, "'' is not one of ['1.0']"], [data_invalid_version, "'1.0.0' is not one of ['1.0']"],