core/tests
Ziv 302e631984
Ability to mock long poll requests + refactor qwikswitch unit… (#33804)
* added the ability to mock a "long poll" get request by setting up the
waiting request and feeding responses to it
with this, refactored the qwikswitch test so it doesn't use global variables
and is more understandable and maintainable

* added import asyncio from merge

* added assert that first call with long_poll has empty content

* passing json instead of the binary string

* use json instead of text in mock requests

* refactored to use a proxy

* return the proxy also for the http methods other than get

* refactored so any side_effect can be used and created the long_poll side effect

* simplified by using kwargs
needed to move the json->text->content logic from mocker to mockrequest

* no need to explicitly define method and url
2020-04-10 14:57:39 -07:00
..
auth Add ability to specify group when creating user (#33373) 2020-03-30 20:33:43 +02:00
components Ability to mock long poll requests + refactor qwikswitch unit… (#33804) 2020-04-10 14:57:39 -07:00
fixtures Bump brother to 0.1.11 (#33526) 2020-04-02 13:52:03 +02:00
hassfest Make Hassfest stricter pt 2 (#30068) 2019-12-19 14:00:22 +01:00
helpers Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
mock Black 2019-07-31 12:25:30 -07:00
resources
scripts Add Safe Mode (#30723) 2020-01-14 13:03:02 -08:00
test_util Ability to mock long poll requests + refactor qwikswitch unit… (#33804) 2020-04-10 14:57:39 -07:00
testing_config Add and use percentage constant (#32094) 2020-02-28 11:46:48 -08:00
util Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
__init__.py
bandit.yaml Enable some more bandit checks (#30857) 2020-01-20 18:44:55 +02:00
common.py Don't write storage to disk while stopping (#33456) 2020-04-02 10:25:28 -07:00
conftest.py Don't write storage to disk while stopping (#33456) 2020-04-02 10:25:28 -07:00
ignore_uncaught_exceptions.py Remove uncaught exceptions from rflink (#33709) 2020-04-07 09:37:54 -07:00
test_bootstrap.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
test_config.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
test_config_entries.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00
test_core.py Collection of random (mainly) test improvements (#33733) 2020-04-06 12:51:48 +02:00
test_data_entry_flow.py Rework FlowManager to use inheritance (#30133) 2020-01-03 11:52:01 +01:00
test_loader.py Extend safe mode (#31927) 2020-02-18 11:52:38 -08:00
test_main.py Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01:00
test_requirements.py Sort imports for requirements.py and its test using isort (#29836) 2019-12-11 12:12:06 +01:00
test_setup.py Collection of core tests improvements (#33757) 2020-04-07 09:33:23 -07:00