3b6bc9067f5066c68936cef7e34dd54bb364d13e,tests/components/mochad/test_light.py,,pymochad_mock,#,15

Before Change


@pytest.fixture(autouse=True)
def pymochad_mock():
    Mock pymochad.
    with mock.patch.dict("sys.modules", {"pymochad": mock.MagicMock()}):
        yield


class TestMochadSwitchSetup(unittest.TestCase):
    Test the mochad light.

    PLATFORM = mochad

After Change


@pytest.fixture(autouse=True)
def pymochad_mock():
    Mock pymochad.
    with mock.patch("homeassistant.components.mochad.light.device") as device:
        yield device


class TestMochadSwitchSetup(unittest.TestCase):
    Test the mochad light.

    PLATFORM = mochad
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: 3b6bc9067f5066c68936cef7e34dd54bb364d13e
Time: 2019-12-05
Author: 46536646+springstan@users.noreply.github.com
File Name: tests/components/mochad/test_light.py
Class Name:
Method Name: pymochad_mock


Project Name: home-assistant/home-assistant
Commit Name: 6a017efc0eae601de56414c39994e287b6646518
Time: 2017-06-17
Author: finish.06@gmail.com
File Name: tests/components/device_tracker/test_unifi.py
Class Name:
Method Name: mock_ctrl


Project Name: home-assistant/home-assistant
Commit Name: a2fbc0d2ef3f0ab69efb00a3e379f1ea3626633e
Time: 2017-06-17
Author: finish.06@gmail.com
File Name: tests/components/device_tracker/test_unifi.py
Class Name:
Method Name: mock_ctrl