hass-core/tests
Robbie Trencheny a5f144cb7c HTML5 notify actions (#2855)
* Add action and callback support to html5 (#2855).

Remove registrations from the callback view since we always get the latest anyway.

We dont put an audience in the claims so we will never hit this error.

Bring tests back up to where they were before callbacks.

Only import jwt where necessary

Fix bracket spacing errors

Fix JWT decode check for loop

Remove stale comment.

Add tests for the callback system.

Shorten line

Disable pylint broad-except and change e to jwt_decode_error.

Verify expiration

Remove duplicate jwt.exceptions.DecodeError

Catch no keys matched and return False

* Switch to using registrations for callbackview instead of json_path

* Only check for URL and such if the data object actually exists

* raise instead of return

* cleanup decode_jwt

* Clean up JWT errors

* Correctly set status_code to 401

* Improve JWT by adding target to claims and attempting to check the given target for a decode match first, as well as pass the target through in the event payload.

* Add tag support and fix formatting issues

* Pass through any keys that dont apply to the payload into the notification.data dictionary

* Remove stale print

* Pass back the data dictionary if it exists

* Actually put the default url even if a notify payload dictionary doesnt exist

* pylint, flake8

* Add subscription validation

* Add validation for the callback event payload and use constants where possible

* Use HTTP_UNAUTHORIZED instead of 401

* Change callback dictionary to dict instead of cv.match_all

* Fix up tests and make subscription required

* Whoops, that test was supposed to fail

* Use the result of CALLBACK_EVENT_PAYLOAD_SCHEMA as event_payload

* Add a test for html5 callback decode_jwt where the device has been renamed since notification has been sent.

* Remove the loop through logic, assume that target is always in JWT

* Always return something instead of possibly None.

* Update frontend
2016-08-17 22:34:12 -07:00
..
components HTML5 notify actions (#2855) 2016-08-17 22:34:12 -07:00
fixtures Move elevation to core config and clean up HTTP mocking in tests (#2378) 2016-06-27 09:02:45 -07:00
helpers add tcp/udp port to config validation (#2854) 2016-08-16 20:55:29 -07:00
resources Revised package util tests 2016-01-30 14:08:32 -05:00
scripts Handle requirements for scripts (#2765) 2016-08-09 23:54:34 -07:00
testing_config/custom_components Exclude tests in dependencies in test dir from pytest (#2618) 2016-07-25 08:26:07 -07:00
util Handle requirements for scripts (#2765) 2016-08-09 23:54:34 -07:00
__init__.py Tweak Recorder 2016-07-11 08:56:07 -07:00
common.py Move unit system to util (#2763) 2016-08-08 20:42:25 -07:00
test_bootstrap.py Allow circular dependency with discovery (#2616) 2016-07-25 22:49:10 -07:00
test_config.py Add unit system support 2016-08-04 22:02:19 -07:00
test_core.py Enforce lower case for services and warn if local unknown service called (#2764) 2016-08-09 19:41:45 -07:00
test_loader.py Fix PEP257 issues 2016-03-09 10:25:50 +01:00
test_remote.py Update unit tests for remote.py (#2782) 2016-08-10 17:40:35 -07:00