Skip to content

Commit 0c76333

Browse files
committed
test: README changes on master
1 parent 3543dfd commit 0c76333

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

tests/test_pandas.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ def country_code_to():
5050
BASIC_QUERIES_SERIES = [
5151
"query_day_ahead_prices",
5252
"query_net_position",
53-
"query_load",
54-
"query_load_forecast",
53+
"query_aggregate_water_reservoirs_and_hydro_storage",
5554
]
5655

5756
BASIC_QUERIES_DATAFRAME = [
57+
"query_load",
58+
"query_load_forecast",
5859
"query_wind_and_solar_forecast",
5960
"query_generation_forecast",
6061
"query_generation",
@@ -100,6 +101,15 @@ def test_crossborder_queries(
100101
result = getattr(client, query)(country_code_from, country_code_to, start=start, end=end)
101102
assert not result.empty
102103

104+
105+
def test_query_offered_capacity(client, country_code_from, country_code_to, start, end):
106+
contract_marketagreement_type = "A01"
107+
result = client.query_offered_capacity(
108+
country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True
109+
)
110+
assert not result.empty
111+
112+
103113
# pandas.DataFrames
104114

105115
@pytest.mark.parametrize(
@@ -114,15 +124,15 @@ def test_basic_queries_dataframe(client, query, country_code, start, end):
114124
def test_query_contracted_reserve_prices(client, country_code, start, end):
115125
type_marketagreement_type = "A01"
116126
result = client.query_contracted_reserve_prices(
117-
country_code, start=start, end=end, type_marketagreement_type=type_marketagreement_type
127+
country_code, start=start, end=end, type_marketagreement_type=type_marketagreement_type, psr_type=None
118128
)
119129
assert not result.empty
120130

121131

122132
def test_query_contracted_reserve_amount(client, country_code, start, end):
123133
type_marketagreement_type = "A01"
124134
result = client.query_contracted_reserve_amount(
125-
country_code, start=start, end=end, type_marketagreement_type=type_marketagreement_type
135+
country_code, start=start, end=end, type_marketagreement_type=type_marketagreement_type, psr_type=None
126136
)
127137
assert not result.empty
128138

@@ -145,6 +155,6 @@ def test_query_procured_balancing_capacity_process_type_not_allowed(client, coun
145155
def test_query_procured_balancing_capacity(client, country_code, start, end):
146156
process_type = "A47"
147157
result = client.query_procured_balancing_capacity(
148-
country_code, start=start, end=end, process_type=process_type
158+
country_code, start=start, end=end, process_type=process_type, type_marketagreement_type=None
149159
)
150160
assert not result.empty

tests/test_raw.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def country_code_to():
6868
"query_generation_per_plant",
6969
"query_installed_generation_capacity",
7070
"query_installed_generation_capacity_per_unit",
71+
"query_aggregate_water_reservoirs_and_hydro_storage",
7172
]
7273

7374
CROSSBORDER_QUERIES = [
@@ -77,7 +78,6 @@ def country_code_to():
7778
"query_net_transfer_capacity_weekahead",
7879
"query_net_transfer_capacity_monthahead",
7980
"query_net_transfer_capacity_yearahead",
80-
"query_intraday_offered_capacity",
8181
]
8282

8383
# XML
@@ -104,10 +104,27 @@ def test_crossborder_queries(
104104
assert valid_xml(result)
105105

106106

107+
def test_query_intraday_offered_capacity(client, country_code_from, country_code_to, start, end):
108+
result = client.query_intraday_offered_capacity(
109+
country_code_from, country_code_to, start, end, implicit=True
110+
)
111+
assert isinstance(result, str)
112+
assert valid_xml(result)
113+
114+
115+
def test_query_offered_capacity(client, country_code_from, country_code_to, start, end):
116+
contract_marketagreement_type = "A01"
117+
result = client.query_offered_capacity(
118+
country_code_from, country_code_to, start, end, contract_marketagreement_type, implicit=True
119+
)
120+
assert isinstance(result, str)
121+
assert valid_xml(result)
122+
123+
107124
def test_query_contracted_reserve_prices(client, country_code, start, end):
108125
type_marketagreement_type = "A01"
109126
result = client.query_contracted_reserve_prices(
110-
country_code, start, end, type_marketagreement_type
127+
country_code, start, end, type_marketagreement_type, psr_type=None
111128
)
112129
assert isinstance(result, str)
113130
assert valid_xml(result)
@@ -116,17 +133,16 @@ def test_query_contracted_reserve_prices(client, country_code, start, end):
116133
def test_query_contracted_reserve_amount(client, country_code, start, end):
117134
type_marketagreement_type = "A01"
118135
result = client.query_contracted_reserve_amount(
119-
country_code, start, end, type_marketagreement_type
136+
country_code, start, end, type_marketagreement_type, psr_type=None
120137
)
121138
assert isinstance(result, str)
122139
assert valid_xml(result)
123140

124141

125142
def test_query_procured_balancing_capacity_bytearray(client, country_code, start, end):
126-
type_marketagreement_type = "A01"
127143
process_type = "A47"
128144
result = client.query_procured_balancing_capacity(
129-
country_code, start, end, process_type, type_marketagreement_type
145+
country_code, start, end, process_type, type_marketagreement_type=None
130146
)
131147
assert isinstance(result, str)
132148
assert valid_xml(result)
@@ -143,25 +159,25 @@ def test_query_procured_balancing_capacity_process_type_not_allowed(client):
143159
# ZIP
144160

145161
def test_query_imbalance_prices(client, country_code, start, end):
146-
result = client.query_imbalance_prices(country_code, start, end)
162+
result = client.query_imbalance_prices(country_code, start, end, psr_type=None)
147163
assert isinstance(result, (bytes, bytearray))
148164

149165

150166
def test_query_unavailability_of_generation_units(client, country_code, start, end):
151-
result = client.query_unavailability_of_generation_units(country_code, start, end,)
167+
result = client.query_unavailability_of_generation_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None)
152168
assert isinstance(result, (bytes, bytearray))
153169

154170

155171
def test_query_unavailability_of_production_units(client, country_code, start, end):
156-
result = client.query_unavailability_of_production_units(country_code, start, end,)
172+
result = client.query_unavailability_of_production_units(country_code, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None)
157173
assert isinstance(result, (bytes, bytearray))
158174

159175

160176
def test_query_unavailability_transmission(
161177
client, country_code_from, country_code_to, start, end
162178
):
163179
result = client.query_unavailability_transmission(
164-
country_code_from, country_code_to, start, end,
180+
country_code_from, country_code_to, start, end, docstatus=None, periodstartupdate=None, periodendupdate=None
165181
)
166182
assert isinstance(result, (bytes, bytearray))
167183

0 commit comments

Comments
 (0)