b00d0a12535b6f215e595d660b5c04ad22e68eb9,tests/components/device_tracker/test_unifi.py,,test_scanner_update,#,139

Before Change


def test_scanner_update():
    Test the scanner update.
    ctrl = mock.MagicMock()
    fake_clients = [
        {"mac": "123"},
        {"mac": "234"},
    ]
    ctrl.get_clients.return_value = fake_clients
    unifi.UnifiScanner(ctrl)
    assert ctrl.get_clients.call_count == 1
    assert ctrl.get_clients.call_args == mock.call()

After Change


    ctrl = mock.MagicMock()
    fake_clients = [
        {"mac": "123", "last_seen": dt_util.as_timestamp(dt_util.utcnow())},
        {"mac": "234", "last_seen": dt_util.as_timestamp(dt_util.utcnow())},
    ]
    ctrl.get_clients.return_value = fake_clients
    unifi.UnifiScanner(ctrl, DEFAULT_DETECTION_TIME)
    assert ctrl.get_clients.call_count == 1
    assert ctrl.get_clients.call_args == mock.call()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: b00d0a12535b6f215e595d660b5c04ad22e68eb9
Time: 2017-10-13
Author: rbflurry@gmail.com
File Name: tests/components/device_tracker/test_unifi.py
Class Name:
Method Name: test_scanner_update


Project Name: home-assistant/home-assistant
Commit Name: b00d0a12535b6f215e595d660b5c04ad22e68eb9
Time: 2017-10-13
Author: rbflurry@gmail.com
File Name: tests/components/device_tracker/test_unifi.py
Class Name:
Method Name: test_scan_devices


Project Name: home-assistant/home-assistant
Commit Name: b4fc1d77ea8fdd1bf53efd222fbb28b46ffd497b
Time: 2019-04-03
Author: awarecan@users.noreply.github.com
File Name: tests/components/trend/test_binary_sensor.py
Class Name: TestTrendBinarySensor
Method Name: test_down_using_trendline


Project Name: okfn-brasil/serenata-de-amor
Commit Name: c01093ea481de222970eeb1ff52c0184abe4eaa7
Time: 2016-12-06
Author: andresouzapinho@gmail.com
File Name: src/fetch_foursquare_info.py
Class Name:
Method Name: