fe8dec27a38cfeeb00129a555e1a4e850b1e4251,tests/components/emulated_hue/test_init.py,,test_config_google_home_entity_id_to_number_empty,#,77

Before Change


    })

    mop = mock_open(read_data="")
    handle = mop()

    with patch("homeassistant.util.json.open", mop, create=True):
        with patch("homeassistant.util.json.os.open", return_value=0):
            with patch("homeassistant.util.json.os.replace"):

After Change


            number = conf.entity_id_to_number("light.test")
            assert number == "1"
            assert json_saver.call_count == 1
            assert json_loader.call_count == 1

            assert json_saver.mock_calls[0][1][1] == {
                "1": "light.test",
            }
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: fe8dec27a38cfeeb00129a555e1a4e850b1e4251
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_empty


Project Name: home-assistant/home-assistant
Commit Name: fe8dec27a38cfeeb00129a555e1a4e850b1e4251
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number


Project Name: home-assistant/home-assistant
Commit Name: fe8dec27a38cfeeb00129a555e1a4e850b1e4251
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_altered


Project Name: home-assistant/home-assistant
Commit Name: 50f0eac7f37c2339a56f77e12da443edae3bdf9c
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_altered


Project Name: home-assistant/home-assistant
Commit Name: 50f0eac7f37c2339a56f77e12da443edae3bdf9c
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number


Project Name: home-assistant/home-assistant
Commit Name: 50f0eac7f37c2339a56f77e12da443edae3bdf9c
Time: 2018-10-23
Author: nicko@nicko.org
File Name: tests/components/emulated_hue/test_init.py
Class Name:
Method Name: test_config_google_home_entity_id_to_number_empty