Skip to content

Commit a6e09ae

Browse files
authored
fix: format is not "AWF" but "UTILTS" (#10)
* fix: format is not "AWF" but "UTILTS" * black
1 parent 080f40c commit a6e09ae

File tree

5 files changed

+22
-20
lines changed

5 files changed

+22
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Das Ergebnis sieht dann so aus:
110110
"pruefidentifikator": "25001",
111111
"beschreibung": "Berechnungsformel",
112112
"kommunikation_von": "NB an MSB / LF",
113-
"format": "AWF",
113+
"format": "UTILTS",
114114
"segments": [
115115
{
116116
"id": "UNH",

src/fundamend/reader/ahbreader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def _read_anwendungsfall(self, original_element: ET.Element) -> Anwendungsfall:
237237
pruefidentifikator=original_element.attrib["Pruefidentifikator"],
238238
beschreibung=original_element.attrib["Beschreibung"],
239239
kommunikation_von=original_element.attrib["Kommunikation_von"],
240-
format=original_element.tag.lstrip("M_"),
240+
format=original_element[0].tag.lstrip("M_"),
241241
segments=[s for s in segments_and_groups if isinstance(s, Segment)],
242242
segment_groups=[s for s in segments_and_groups if isinstance(s, SegmentGroup)],
243243
)

unittests/example_ahb_utilts_11c.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
pruefidentifikator="25001",
2424
beschreibung="Berechnungsformel",
2525
kommunikation_von="NB an MSB / LF",
26-
format="AWF",
26+
format="UTILTS",
2727
segments=[
2828
Segment(
2929
id="UNH",
@@ -6731,7 +6731,7 @@
67316731
pruefidentifikator="25002",
67326732
beschreibung="Ablehnung Berechnungsformel",
67336733
kommunikation_von="MSB an NB",
6734-
format="AWF",
6734+
format="UTILTS",
67356735
segments=[
67366736
Segment(
67376737
id="UNH",
@@ -13439,7 +13439,7 @@
1343913439
pruefidentifikator="25003",
1344013440
beschreibung="Zustimmung Berechnungsformel",
1344113441
kommunikation_von="MSB an NB",
13442-
format="AWF",
13442+
format="UTILTS",
1344313443
segments=[
1344413444
Segment(
1344513445
id="UNH",
@@ -20147,7 +20147,7 @@
2014720147
pruefidentifikator="25009",
2014820148
beschreibung="Übermittlung einer ausgerollten Leistungskurvendefinition",
2014920149
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
20150-
format="AWF",
20150+
format="UTILTS",
2015120151
segments=[
2015220152
Segment(
2015320153
id="UNH",
@@ -26855,7 +26855,7 @@
2685526855
pruefidentifikator="25008",
2685626856
beschreibung="Übermittlung einer ausgerollten Schaltzeitdefinition",
2685726857
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
26858-
format="AWF",
26858+
format="UTILTS",
2685926859
segments=[
2686026860
Segment(
2686126861
id="UNH",
@@ -33563,7 +33563,7 @@
3356333563
pruefidentifikator="25005",
3356433564
beschreibung="Übermittlung einer ausgerollten Zählzeitdefinition",
3356533565
kommunikation_von="NB an LF / MSB\r\nLF an MSB",
33566-
format="AWF",
33566+
format="UTILTS",
3356733567
segments=[
3356833568
Segment(
3356933569
id="UNH",
@@ -40271,7 +40271,7 @@
4027140271
pruefidentifikator="25007",
4027240272
beschreibung="Übermittlung Übersicht Leistungskurvendefinitionen",
4027340273
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
40274-
format="AWF",
40274+
format="UTILTS",
4027540275
segments=[
4027640276
Segment(
4027740277
id="UNH",
@@ -46979,7 +46979,7 @@
4697946979
pruefidentifikator="25006",
4698046980
beschreibung="Übermittlung Übersicht Schaltzeitdefinitionen",
4698146981
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
46982-
format="AWF",
46982+
format="UTILTS",
4698346983
segments=[
4698446984
Segment(
4698546985
id="UNH",
@@ -53687,7 +53687,7 @@
5368753687
pruefidentifikator="25004",
5368853688
beschreibung="Übermittlung Übersicht Zählzeitdefinitionen",
5368953689
kommunikation_von="NB an LF / MSB\r\nLF an MSB",
53690-
format="AWF",
53690+
format="UTILTS",
5369153691
segments=[
5369253692
Segment(
5369353693
id="UNH",

unittests/example_ahb_utilts_11d.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
pruefidentifikator="25001",
2424
beschreibung="Berechnungsformel",
2525
kommunikation_von="NB an MSB / LF",
26-
format="AWF",
26+
format="UTILTS",
2727
segments=[
2828
Segment(
2929
id="UNH",
@@ -6683,7 +6683,7 @@
66836683
pruefidentifikator="25002",
66846684
beschreibung="Ablehnung Berechnungsformel",
66856685
kommunikation_von="MSB an NB",
6686-
format="AWF",
6686+
format="UTILTS",
66876687
segments=[
66886688
Segment(
66896689
id="UNH",
@@ -13343,7 +13343,7 @@
1334313343
pruefidentifikator="25003",
1334413344
beschreibung="Zustimmung Berechnungsformel",
1334513345
kommunikation_von="MSB an NB",
13346-
format="AWF",
13346+
format="UTILTS",
1334713347
segments=[
1334813348
Segment(
1334913349
id="UNH",
@@ -20003,7 +20003,7 @@
2000320003
pruefidentifikator="25009",
2000420004
beschreibung="Übermittlung einer ausgerollten Leistungskurvendefinition",
2000520005
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
20006-
format="AWF",
20006+
format="UTILTS",
2000720007
segments=[
2000820008
Segment(
2000920009
id="UNH",
@@ -26663,7 +26663,7 @@
2666326663
pruefidentifikator="25008",
2666426664
beschreibung="Übermittlung einer ausgerollten Schaltzeitdefinition",
2666526665
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
26666-
format="AWF",
26666+
format="UTILTS",
2666726667
segments=[
2666826668
Segment(
2666926669
id="UNH",
@@ -33323,7 +33323,7 @@
3332333323
pruefidentifikator="25005",
3332433324
beschreibung="Übermittlung einer ausgerollten Zählzeitdefinition",
3332533325
kommunikation_von="NB an LF / MSB\r\nLF an MSB",
33326-
format="AWF",
33326+
format="UTILTS",
3332733327
segments=[
3332833328
Segment(
3332933329
id="UNH",
@@ -39983,7 +39983,7 @@
3998339983
pruefidentifikator="25007",
3998439984
beschreibung="Übermittlung Übersicht Leistungskurvendefinitionen",
3998539985
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
39986-
format="AWF",
39986+
format="UTILTS",
3998739987
segments=[
3998839988
Segment(
3998939989
id="UNH",
@@ -46643,7 +46643,7 @@
4664346643
pruefidentifikator="25006",
4664446644
beschreibung="Übermittlung Übersicht Schaltzeitdefinitionen",
4664546645
kommunikation_von="NB an LF / MSB\r\nLF an NB, MSB",
46646-
format="AWF",
46646+
format="UTILTS",
4664746647
segments=[
4664846648
Segment(
4664946649
id="UNH",
@@ -53303,7 +53303,7 @@
5330353303
pruefidentifikator="25004",
5330453304
beschreibung="Übermittlung Übersicht Zählzeitdefinitionen",
5330553305
kommunikation_von="NB an LF / MSB\r\nLF an MSB",
53306-
format="AWF",
53306+
format="UTILTS",
5330753307
segments=[
5330853308
Segment(
5330953309
id="UNH",

unittests/test_ahbreader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ def test_get_anwendungsfall(ahb_xml_file_path: Path, pruefidentifikator: str, ex
128128
assert actual is not None
129129
assert isinstance(actual, Anwendungsfall)
130130
assert actual.pruefidentifikator == pruefidentifikator
131+
if "UTILTS" in str(ahb_xml_file_path):
132+
assert actual.format == "UTILTS"
131133
else:
132134
assert actual is None
133135

0 commit comments

Comments
 (0)