Move fixtures part 1 (#58902)
This commit is contained in:
parent
0a94badb72
commit
31153ac155
561 changed files with 188 additions and 991 deletions
28
tests/components/melissa/fixtures/cur_settings.json
Normal file
28
tests/components/melissa/fixtures/cur_settings.json
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"controller": {
|
||||
"id": 1,
|
||||
"user_id": 1,
|
||||
"serial_number": "12345678",
|
||||
"mac": "12345678",
|
||||
"firmware_version": "V1SHTHF",
|
||||
"name": "Melissa 12345678",
|
||||
"type": "melissa",
|
||||
"room_id": null,
|
||||
"created": "2016-07-06 18:59:46",
|
||||
"deleted_at": null,
|
||||
"online": true,
|
||||
"_relation": {
|
||||
"command_log": {
|
||||
"state": 1,
|
||||
"mode": 2,
|
||||
"temp": 16,
|
||||
"fan": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "/v1/controllers/12345678"
|
||||
}
|
||||
}
|
||||
}
|
27
tests/components/melissa/fixtures/fetch_devices.json
Normal file
27
tests/components/melissa/fixtures/fetch_devices.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"12345678": {
|
||||
"user_id": 1,
|
||||
"serial_number": "12345678",
|
||||
"mac": "12345678",
|
||||
"firmware_version": "V1SHTHF",
|
||||
"name": "Melissa 12345678",
|
||||
"type": "melissa",
|
||||
"room_id": null,
|
||||
"created": "2016-07-06 18:59:46",
|
||||
"id": 1,
|
||||
"online": true,
|
||||
"brand_id": 1,
|
||||
"controller_log": {
|
||||
"temp": 27.4,
|
||||
"created": "2018-01-08T21:01:14.281Z",
|
||||
"raw_temperature": 28928,
|
||||
"humidity": 18.7,
|
||||
"raw_humidity": 12946
|
||||
},
|
||||
"_links": {
|
||||
"self": {
|
||||
"href": "/v1/controllers"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
tests/components/melissa/fixtures/status.json
Normal file
8
tests/components/melissa/fixtures/status.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"12345678": {
|
||||
"temp": 27.4,
|
||||
"raw_temperature": 28928,
|
||||
"humidity": 18.7,
|
||||
"raw_humidity": 12946
|
||||
}
|
||||
}
|
|
@ -25,13 +25,13 @@ def melissa_mock():
|
|||
"""Use this to mock the melissa api."""
|
||||
api = Mock()
|
||||
api.async_fetch_devices = AsyncMock(
|
||||
return_value=json.loads(load_fixture("melissa_fetch_devices.json"))
|
||||
return_value=json.loads(load_fixture("fetch_devices.json", "melissa"))
|
||||
)
|
||||
api.async_status = AsyncMock(
|
||||
return_value=json.loads(load_fixture("melissa_status.json"))
|
||||
return_value=json.loads(load_fixture("status.json", "melissa"))
|
||||
)
|
||||
api.async_cur_settings = AsyncMock(
|
||||
return_value=json.loads(load_fixture("melissa_cur_settings.json"))
|
||||
return_value=json.loads(load_fixture("cur_settings.json", "melissa"))
|
||||
)
|
||||
|
||||
api.async_send = AsyncMock(return_value=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue