| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Dumb question: Where does the data come from for the fixtures being generated? Is this tool extracting it from larger fixture files, pulling it from actual devices or generating it from code or other data? |
Sorry, something went wrong.
|
They are being pulled from the device, the script just makes an update for the given device (or all discovered devices, if using --network), reads the internal data (using https://github.com/python-kasa/python-kasa/blob/master/kasa/modules/module.py#L47) from each of the supported modules, and saves it into a separate JSON file. |
Sorry, something went wrong.
Codecov ReportPatch coverage has no change and project coverage change: +0.32% 🎉
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #404 +/- ##
==========================================
+ Coverage 79.02% 79.34% +0.32%
==========================================
Files 24 26 +2
Lines 1821 1980 +159
Branches 266 613 +347
==========================================
+ Hits 1439 1571 +132
- Misses 348 367 +19
- Partials 34 42 +8 see 13 files with indirect coverage changes ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
|
I think there is no harm merging this as it may be useful for someone even when there are currently no tests for individual modules. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I created this script earlier to test the idea of having module-specific fixture files for testing, but never had time to finish working on that. This draft is created just to not forget about it completely.
Usage: create_module_fixtures.py [OPTIONS] OUTPUTDIR Create module fixtures for given host/network. Arguments: OUTPUTDIR [required] Options: --host TEXT --network TEXT --install-completion Install completion for the current shell. --show-completion Show completion for the current shell, to copy it or customize the installation. --help Show this message and exit.for example:
will create files from the given network under /tmp/testfix/:
cat /tmp/testfix/cloud/HS110\(EU\)_1.0_1.2.5.json { "get_info": { "username": "", "server": "devs.tplinkcloud.com", "binded": 0, "cld_connection": 0, "illegalType": -1, "stopConnect": -1, "tcspStatus": -1, "fwDlPage": "", "tcspInfo": "", "fwNotifyType": 0, "err_code": 0 } }