-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest_einspeisung.py
More file actions
31 lines (28 loc) · 1.15 KB
/
test_einspeisung.py
File metadata and controls
31 lines (28 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pytest
from bo4e import Geschaeftspartnerrolle, Landescode
from bo4e.bo.einspeisung import Einspeisung
from bo4e.enum.eeg_vermarktungsform import EEGVermarktungsform
from bo4e.enum.fernsteuerbarkeit_status import FernsteuerbarkeitStatus
from tests.serialization_helper import assert_serialization_roundtrip
class TestEinspeisung:
@pytest.mark.parametrize(
"einspeisung",
[
pytest.param(
Einspeisung(
marktlokations_id="teststring",
tranche_id="teststring",
verguetungsempfaenger=Geschaeftspartnerrolle.LIEFERANT,
eeg_vermarktungsform=EEGVermarktungsform.KWKG_VERGUETUNG,
landescode=Landescode.DE, # type:ignore[attr-defined]
fernsteuerbarkeit_status=FernsteuerbarkeitStatus.NICHT_FERNSTEUERBAR,
),
id="all attributes at first level",
),
],
)
def test_serialization_roundtrip(self, einspeisung: Einspeisung) -> None:
"""
Test de-/serialisation of Einspeisung
"""
assert_serialization_roundtrip(einspeisung)