BeatsuDev / tibber.py

An UNOFFICIAL python wrapper for the nordic electricity company Tibber's API.
MIT License
17 stars 2 forks source link

[BUG] Tests fail to assertion errors due to changes to the Tibber demo account #15

Closed BeatsuDev closed 2 years ago

BeatsuDev commented 2 years ago

Describe the bug

Pytest tests fail due to changes to the Tibber demo account. Specifically, the "real_time_consumption_enabled" home feature has been changed to False (was previously True) and subscription status has been changed to 'ended' (was previously 'running').

To Reproduce

Steps to reproduce the behavior:

python -m pytest tests
________________________________ test_real_time_consumption __________________________________ 

home = <tibber.types.home.TibberHome object at 0x000002A198BA2FA0>

    def test_real_time_consumption(home):
>       assert home.features.real_time_consumption_enabled
E       assert False
E        +  where False = <tibber.types.home_features.HomeFeatures object at 0x000002A198BA4550>.real_time_consumption_enabled
E        +    where <tibber.types.home_features.HomeFeatures object at 0x000002A198BA4550> = <tibber.types.home.TibberHome object at 0x000002A198BA2FA0>.features

tests\cached\test_home_features.py:17: AssertionError
________________________________ test_getting_status _____________________________________________ 

subscription = <tibber.types.subscription.Subscription object at 0x000002A198B3CD30>

    def test_getting_status(subscription):
>       assert subscription.status == "running"
E       AssertionError: assert 'ended' == 'running'
E         - running
E         + ended

tests\cached\test_subscription.py:33: AssertionError
BeatsuDev commented 2 years ago

Fixed in acc3fb4d771fd06468294a793ada28ea6b37db36.