Mobile App: Remove component loading support (#23025)

Loading a component defined in a registration didn't actually work and was undocumented, so let's just remove it instead of fixing #23005.

## Checklist:
  - [X] The code change is tested and works locally.
  - [X] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [X] There is no commented out code in this PR.
This commit is contained in:
Robbie Trencheny 2019-04-11 19:06:36 -07:00 committed by GitHub
parent 7e39e14086
commit 7303d56a55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 50 deletions

View file

@ -80,28 +80,3 @@ async def test_registration(hass, hass_client): # noqa: F811
decrypted_data = decrypted_data.decode("utf-8")
assert json.loads(decrypted_data) == {'one': 'Hello world'}
async def test_register_invalid_component(authed_api_client): # noqa: F811
"""Test that registration with invalid component fails."""
resp = await authed_api_client.post(
'/api/mobile_app/registrations', json={
'app_component': 'will_never_be_valid',
'app_data': {'foo': 'bar'},
'app_id': 'io.homeassistant.mobile_app_test',
'app_name': 'Mobile App Tests',
'app_version': '1.0.0',
'device_name': 'Test 1',
'manufacturer': 'mobile_app',
'model': 'Test',
'os_name': 'Linux',
'os_version': '1.0',
'supports_encryption': True
}
)
assert resp.status == 400
register_json = await resp.json()
assert 'error' in register_json
assert register_json['success'] is False
assert register_json['error']['code'] == 'invalid_component'