e37fd5b132666f9d57e31623adc9ecf1e00ad069,tests/components/homekit/test_homekit.py,TestHomeKit,test_homekit_stop,#TestHomeKit#,195

Before Change



        // Test if started = False
        homekit.stop()
        self.assertFalse(homekit.driver.stop.called)

        // Test if driver not started
        homekit.started = True
        homekit.driver.configure_mock(**{"run_sentinel": None})

After Change



        self.assertEqual(homekit.status, STATUS_READY)
        homekit.stop()
        self.hass.block_till_done()
        homekit.status = STATUS_WAIT
        homekit.stop()
        self.hass.block_till_done()
        homekit.status = STATUS_STOPPED
        homekit.stop()
        self.hass.block_till_done()
        self.assertFalse(homekit.driver.stop.called)

        // Test if driver is started
        homekit.status = STATUS_RUNNING
        homekit.stop()
        self.hass.block_till_done()
        self.assertTrue(homekit.driver.stop.called)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: home-assistant/home-assistant
Commit Name: e37fd5b132666f9d57e31623adc9ecf1e00ad069
Time: 2018-05-04
Author: 30130371+cdce8p@users.noreply.github.com
File Name: tests/components/homekit/test_homekit.py
Class Name: TestHomeKit
Method Name: test_homekit_stop


Project Name: home-assistant/home-assistant
Commit Name: 33663f95026eb7a6fd3b9dcc716a7b88029c1a10
Time: 2017-07-31
Author: marhje52@kth.se
File Name: tests/components/remote/test_demo.py
Class Name: TestDemoRemote
Method Name: test_methods


Project Name: home-assistant/home-assistant
Commit Name: e37fd5b132666f9d57e31623adc9ecf1e00ad069
Time: 2018-05-04
Author: 30130371+cdce8p@users.noreply.github.com
File Name: tests/components/homekit/test_homekit.py
Class Name: TestHomeKit
Method Name: test_homekit_stop


Project Name: home-assistant/home-assistant
Commit Name: b67c5df5257d58a172ea9f00d8229700f2d0532f
Time: 2017-07-06
Author: rc2012@pblue.org
File Name: tests/components/cover/test_template.py
Class Name: TestTemplateCover
Method Name: test_set_position