Closed peterdudfield closed 2 months ago
@BraunRudolf following on from #173 i tried to get the test working, but they failed. Do you have time to look at this?
I also put an issue in about tests not passing on external github accounts - #187
I suspect its something to do with these not being set -
but im not sure if they need to be set for these tests?
@peterdudfield the commit 3e11e48 implemented a class for the enphase with pydantic model.
class EnphaseSettings(BaseSettings):
model_config = SettingsConfigDict(env_file='.env', extra='ignore')
client_id: str = Field(alias="ENPHASE_CLIENT_ID")
system_id: str = Field(alias="ENPHASE_SYSTEM_ID")
api_key: str = Field(alias="ENPHASE_API_KEY")
client_secret: str = Field(alias="ENPHASE_CLIENT_SECRET")
I guess the easiest thing would be to remove the enphase tests and rewrite them.
@peterdudfield the commit 3e11e48 implemented a class for the enphase with pydantic model.
class EnphaseSettings(BaseSettings): model_config = SettingsConfigDict(env_file='.env', extra='ignore') client_id: str = Field(alias="ENPHASE_CLIENT_ID") system_id: str = Field(alias="ENPHASE_SYSTEM_ID") api_key: str = Field(alias="ENPHASE_API_KEY") client_secret: str = Field(alias="ENPHASE_CLIENT_SECRET")
I guess the easiest thing would be to remove the enphase tests and rewrite them.
yea, maybe I could skip that test for the moment. Until we would out a way to get that test working. its tricky becasue I cant make the variables public
Patching the last three tests with dummy strings could do the trick. If you could either delete the last three tests or comment them out, and then merge to main, I would try to fix them on a new branch.
Ill merge this in @BraunRudolf , thanks, and let you do a different PR
Pull Request
Description
Add api tests from #173 Fixes #
How Has This Been Tested?
CI tests
[ ] Yes
Checklist:
[ ] My code follows OCF's coding style guidelines
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked my code and corrected any misspellings