diff --git a/src/ga4gh/va_spec/aac_2017/models.py b/src/ga4gh/va_spec/aac_2017/models.py index 83b1566..3f83a1c 100644 --- a/src/ga4gh/va_spec/aac_2017/models.py +++ b/src/ga4gh/va_spec/aac_2017/models.py @@ -224,6 +224,9 @@ class VariantClinicalSignificanceStatement( @classmethod def validate_tier_evidence_lines(cls, values: dict) -> dict: """Validate tier I and II evidence-line types before base coercion.""" + if not isinstance(values, dict): + return values + classification = values.get("classification") if not isinstance(classification, dict): return values diff --git a/tests/validation/test_va_spec_fixtures_validation.py b/tests/validation/test_va_spec_fixtures_validation.py index ab68c08..941ae68 100644 --- a/tests/validation/test_va_spec_fixtures_validation.py +++ b/tests/validation/test_va_spec_fixtures_validation.py @@ -22,9 +22,15 @@ for test_def in test_definitions: - if test_def["namespace"].startswith("va-spec."): - schema = get_va_spec_schema(test_def["namespace"].split("va-spec.")[-1]) - VA_SPEC_TEST_DEFINITIONS[schema].append(test_def) + namespace = test_def["namespace"] + # Base (core) fixtures use the namespace ``va-spec``; profiles use + # ``va-spec.``. Anything else (e.g. ``vrs``) is out of scope. + if namespace != "va-spec" and not namespace.startswith("va-spec."): + continue + schema = get_va_spec_schema(namespace.split("va-spec.")[-1]) + if schema is None: + continue + VA_SPEC_TEST_DEFINITIONS[schema].append(test_def) def test_va_spec_fixtures():