Download pool/shard009/Python/0080265_test_init.py from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard009/Python/0080265_test_init.py
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard009/Python/0080265_test_init.py
-
curl -L -o 0080265_test_init.py https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard009/Python/0080265_test_init.py
796 Bytes
| """The test for the Melissa Climate component.""" | |
| from unittest.mock import AsyncMock, patch | |
| from homeassistant.components import melissa | |
| VALID_CONFIG = {"melissa": {"username": "********", "password": "********"}} | |
| async def test_setup(hass): | |
| """Test setting up the Melissa component.""" | |
| with patch("melissa.AsyncMelissa") as mocked_melissa, patch.object( | |
| melissa, "async_load_platform" | |
| ): | |
| mocked_melissa.return_value.async_connect = AsyncMock() | |
| await melissa.async_setup(hass, VALID_CONFIG) | |
| mocked_melissa.assert_called_with(username="********", password="********") | |
| assert melissa.DATA_MELISSA in hass.data | |
| assert isinstance( | |
| hass.data[melissa.DATA_MELISSA], | |
| type(mocked_melissa.return_value), | |
| ) | |