core/homeassistant
Tim McCormick 6c6a5c50a5 Fix digest auth rest sensors (#28153)
* Fix digest auth rest sensors

* Refactor to use request()

* Fix black complaints

* Don't rename data variable

Don't rename the data variable, appears several other sensors have been coded to rely on it

* Fix tests

test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.

test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.

test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.

* Remove no longer needed import

* Fix binary sensor test in same way
2019-11-25 23:22:11 -08:00
..
auth Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
components Fix digest auth rest sensors (#28153) 2019-11-25 23:22:11 -08:00
generated GeoNet NZ Volcanic Alert Level sensor (#26901) 2019-11-19 14:00:59 +01:00
helpers Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
scripts Bump keyring to 19.2.0 (#27899) 2019-10-18 20:09:41 -05:00
util Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
__init__.py
__main__.py Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
bootstrap.py Add cloud account linking support (#28210) 2019-10-25 16:04:24 -07:00
config.py Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
config_entries.py Add source constants for all config entry discovery sources (#28311) 2019-10-28 23:32:57 -07:00
const.py Add broadcast_address for wake-on-lan (#28793) 2019-11-17 12:52:33 +01:00
core.py Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
data_entry_flow.py Type hint improvements (#28260) 2019-10-28 13:36:26 -07:00
exceptions.py Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
loader.py Lint config cleanups (#28864) 2019-11-25 22:40:08 -08:00
monkey_patch.py Lint exclusions (#28655) 2019-11-16 10:22:07 +01:00
package_constraints.txt Upgrade zeroconf to 0.24.0 (#28986) 2019-11-23 23:11:01 +01:00
requirements.py Also install after_deps (#28453) 2019-11-01 17:21:50 -07:00
setup.py Check for import errors before validating config (#28395) 2019-10-31 11:38:06 -07:00