6a017efc0eae601de56414c39994e287b6646518,tests/components/device_tracker/test_unifi.py,,mock_ctrl,#,14

Before Change


@pytest.fixture
def mock_ctrl():
    Mock pyunifi.
    module = mock.MagicMock()
    with mock.patch.dict("sys.modules", {
        "pyunifi.controller": module.controller,
    }):
        yield module.controller.Controller


@pytest.fixture
def mock_scanner():
    Mock UnifyScanner.
    with mock.patch("homeassistant.components.device_tracker"

After Change


@pytest.fixture
def mock_ctrl():
    Mock pyunifi.
    with mock.patch("pyunifi.controller.Controller") as mock_control:
        yield mock_control


@pytest.fixture
def mock_scanner():
    Mock UnifyScanner.
    with mock.patch("homeassistant.components.device_tracker"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


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


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