Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicadores PMD, DSVB i DSVS #55

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions esios/indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,12 @@ class PriceMedioHorarioAJOMcur(Indicator):

class PriceSRAD(Indicator):
path = 'indicators/1930'

class PrecioMercadoDiario(Indicator):
path = 'indicators/600'

class PrecioDesviosSubir(Indicator):
path = 'indicators/686'

class PrecioDesviosBajar(Indicator):
path = 'indicators/687'
36 changes: 36 additions & 0 deletions spec/indicators_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,3 +928,39 @@
expect(data['indicator']['name']).to(
contain(u'Precio marginal en el servicio de respuesta activa de la demanda')
)

with it('Returns PrecioMercadoDiario instance'):
e = Esios(self.token)
profile = PrecioMercadoDiario(e)
assert isinstance(profile, PrecioMercadoDiario)
data = profile.get(self.start_date, self.end_date)
expect(data['indicator']['short_name']).to(
equal(u'Mercado SPOT')
)
expect(data['indicator']['name']).to(
contain(u'Precio mercado SPOT Diario')
)

with it('Returns PrecioDesviosSubir instance'):
e = Esios(self.token)
profile = PrecioDesviosSubir(e)
assert isinstance(profile, PrecioDesviosSubir)
data = profile.get(self.start_date, self.end_date)
expect(data['indicator']['short_name']).to(
equal(u'Desvíos a subir')
)
expect(data['indicator']['name']).to(
contain(u'Precio de cobro desvíos a subir')
)

with it('Returns PrecioDesviosBajar instance'):
e = Esios(self.token)
profile = PrecioDesviosBajar(e)
assert isinstance(profile, PrecioDesviosBajar)
data = profile.get(self.start_date, self.end_date)
expect(data['indicator']['short_name']).to(
equal(u'Desvíos a bajar')
)
expect(data['indicator']['name']).to(
contain(u'Precio de pago desvíos a bajar')
)
Loading