-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add api tests #186
Add api tests #186
Conversation
* Add unit tests for api only added two tests, many cases are covert by frontend * Modify tests/api_tests/test_api.py add assert * Add an other test add test_wrong_body * Remove print statements * Remove __pycache__/test_api.cpython-311-pytest-8.3.2.pyc * Add variables for expected values * Update api test to new requirements * Add test_getenphse_authorization_url.py * Add test_getenphse_token_and_system_id - bad redirect url - bad redirect url with correct param - fixtures
@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 |
@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. |
Patching the last three tests with dummy strings could do the trick. |
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
Checklist: