diff --git a/pyxform/entities/entities_parsing.py b/pyxform/entities/entities_parsing.py index 578485c9..09cb8149 100644 --- a/pyxform/entities/entities_parsing.py +++ b/pyxform/entities/entities_parsing.py @@ -25,12 +25,12 @@ def get_entity_declaration( if dataset.startswith(constants.ENTITIES_RESERVED_PREFIX): raise PyXFormError( - f"Invalid dataset name: '{dataset}' starts with reserved prefix {constants.ENTITIES_RESERVED_PREFIX}." + f"Invalid entity list name: '{dataset}' starts with reserved prefix {constants.ENTITIES_RESERVED_PREFIX}." ) if "." in dataset: raise PyXFormError( - f"Invalid dataset name: '{dataset}'. Dataset names may not include periods." + f"Invalid entity list name: '{dataset}'. Names may not include periods." ) if not is_valid_xml_tag(dataset): @@ -38,7 +38,7 @@ def get_entity_declaration( dataset = dataset.encode("utf-8") raise PyXFormError( - f"Invalid dataset name: '{dataset}'. Dataset names must begin with a letter, colon, or underscore. Other characters can include numbers or dashes." + f"Invalid entity list name: '{dataset}'. Names must begin with a letter, colon, or underscore. Other characters can include numbers or dashes." ) if not ("label" in entity): diff --git a/tests/test_entities.py b/tests/test_entities.py index c4ab300f..794a327e 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -60,7 +60,7 @@ def test_dataset_with_reserved_prefix__errors(self): """, errored=True, error__contains=[ - "Invalid dataset name: '__sweet' starts with reserved prefix __." + "Invalid entity list name: '__sweet' starts with reserved prefix __." ], ) @@ -77,7 +77,7 @@ def test_dataset_with_invalid_xml_name__errors(self): """, errored=True, error__contains=[ - "Invalid dataset name: '$sweet'. Dataset names must begin with a letter, colon, or underscore. Other characters can include numbers or dashes." + "Invalid entity list name: '$sweet'. Names must begin with a letter, colon, or underscore. Other characters can include numbers or dashes." ], ) @@ -94,7 +94,7 @@ def test_dataset_with_period_in_name__errors(self): """, errored=True, error__contains=[ - "Invalid dataset name: 's.w.eet'. Dataset names may not include periods." + "Invalid entity list name: 's.w.eet'. Names may not include periods." ], )