testdata package

Submodules

testdata.testdata module

testdata.testdata.get_cps_name_from_crp_config(crp_config: dict) → str
testdata.testdata.get_crp_config_with_cps_name(name: str, crps: list[dict]) → dict
testdata.testdata.parse_config(filename: str = None, config: dict = None, **kwargs)
Parses a JSON file or config dict and overwrites the configuration with any values specified in kwargs.

The JSON in the file or config dict must be formatted as defined by the __json__ method of the entity to be generated downstream, containing at minimum the values required by the associated generator method to create that entity.

Parameters:
  • filename – The name of the file to load from middle_layer/testdata/config

  • config – The input dictionary to modify if not loading a JSON file

  • kwargs – keyword-value pairs to overwrite top-level values in the loaded config, e.g. capabilityRequestName=”Foo”

Returns:

A dictionary representation of the entity to be generated

Raises:

ValueError – If both filename and config are specified

Module contents