Currently we only validate the combination of address information if katasterinformation is given.
Steps To Reproduce
def test_address_validation_with_out_katasterinformation(self) -> None:
with pytest.raises(ValidationError) as excinfo:
_ = Marktlokation(
marktlokations_id="51238696781",
sparte=Sparte.GAS,
lokationsadresse=Adresse(
postleitzahl="04177",
ort="Leipzig",
hausnummer="1",
strasse="Jahnalle",
),
energierichtung=Energierichtung.EINSP,
bilanzierungsmethode=Bilanzierungsmethode.PAUSCHAL,
unterbrechbar=True, # optional attribute
netzebene=Netzebene.NSP,
geoadresse=Geokoordinaten(
breitengrad=Decimal("52"),
laengengrad=Decimal("9"),
),
)
Expected vs. Actual Behavior
What you expected
Providing a lokationsadresse and a geoadresse should raise a ValidationError.
What actually happened
The instance is created.
Additional context
Please state your Python version: 3.11
Currently we only validate the combination of address information if
katasterinformationis given.Steps To Reproduce
Expected vs. Actual Behavior
What you expected
Providing a lokationsadresse and a geoadresse should raise a
ValidationError.What actually happened
The instance is created.
Additional context
Please state your Python version: 3.11