File: test_avro_names.py

package info (click to toggle)
python-schema-salad 8.9.20250723145140-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,076 kB
  • sloc: python: 19,177; cpp: 2,631; cs: 1,869; java: 1,341; makefile: 187; xml: 184; sh: 103; javascript: 46
file content (14 lines) | stat: -rw-r--r-- 503 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""Avro related tests."""

from schema_salad.avro.schema import Names
from schema_salad.schema import load_schema

from .util import get_data


def test_avro_loading() -> None:
    """Confirm conversion of SALAD style names to avro."""
    path = get_data("tests/test_schema/avro_naming.yml")
    document_loader, avsc_names, schema_metadata, metaschema_loader = load_schema(path)
    assert isinstance(avsc_names, Names)
    assert avsc_names.get_name("com.example.derived_schema.ExtendedThing", None)