The module `asyncio.test_utils` has been removed from Python in the 3.7 branch, because it was intended to be a private module for internal testing of asyncio. For more information, see the upstream bug report at https://bugs.python.org/issue32273 and the upstream PR at https://github.com/python/cpython/pull/4785.
For this commit, I have migrated the small amount of functionality that was being used from the `asyncio.test_utils` directly into the `RunThreadsafeTests` Class. To see the original `asyncio.test_utils.TestCase` class, which I pulled some functionality from, please see: https://github.com/python/cpython/blob/3.6/Lib/asyncio/test_utils.py#L440
Note: In addition to being broken in 3.7, this test case also seems to be broken in Python 3.6.4 when using Docker. This PR fixes the test when run in docker.
To reproduce: `./script/test_docker -- tests/util/test_async.py`
failing output (prior to this commit):
```
... trimmed ...
py36 runtests: PYTHONHASHSEED='3262989550'
py36 runtests: commands[0] | py.test --timeout=9 --duration=10 --cov --cov-report= tests/util/test_async.py
Test session starts (platform: linux, Python 3.6.4, pytest 3.3.1, pytest-sugar 0.9.0)
rootdir: /usr/src/app, inifile: setup.cfg
plugins: timeout-1.2.1, sugar-0.9.0, cov-2.5.1, aiohttp-0.3.0
timeout: 9.0s method: signal
―――――――――――――――――― ERROR collecting tests/util/test_async.py ――――――――――――――――――――――――
ImportError while importing test module '/usr/src/app/tests/util/test_async.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/util/test_async.py:3: in <module>
from asyncio import test_utils
/usr/local/lib/python3.6/asyncio/test_utils.py:36: in <module>
from test import support
E ImportError: cannot import name 'support'
```
* added media_stop
VLC was missing the media_stop. The pause was present, but starting the same file result in resuming the file instead of start over new
* Corrected style issues
Style issues and added Support Flag to Support VLC
* fixed other style issues
* remove trailing whitespace
* Fix detection of mobile browsers
* Move break
* Add Mobile browsers to list
`Mobile Safari` is covered by iOS and `Opera Mini` does not support es6
... And Edge doesn't even work on desktop for me...
* Fixing demo platform to use support_flags
* Fixed tests as well
* Moved humidity low / high as always available based on defaults
* Updated demo platform to show more combinations
* Entity#unique_id defaults to None
* Initial commit entity registry
* Clean up unique_id property
* Lint
* Add tests to entity component
* Lint
* Restore some unique ids
* Spelling
* Remove use of IP address for unique ID
* Add tests
* Add tests
* Fix tests
* Add some docs
* Add one more test
* Fix new test…
* google_assistant: Refactor query_device
The previous code had issues where domains could break out and end up
with weird brightness values and we weren't enforcing the `on` and
`oneline` keys in the response.
* google_assistant: Add media_player to query test
* Handling of payload not for this entity.
The update state-method should not be called if the payload is not intended for this entity.
* Fixing linter errors
* Adding warning for case when no matching payload is found
* Refactor alexa smart_home tests
The previous tests had a lot of copy pasta due to a lack of expressions
for higher-level assertions. I'm hoping this makes it more reasonable to
extend all interfaces to support properties.
* Lint
* sensor.deutsche_bahn: add only_direct option
This adds the `only_direct` option to the HA interface as provided by the schiene class.
* fix line length
as requested by @houndci-bot and @fabaff
* No line breaks needed