def test_locking(self):
        lock.lock(self.hass, KITCHEN)
        self.hass.pool.block_till_done()

        self.assertTrue(lock.is_locked(self.hass, KITCHEN))
Emit events - possibly delayed.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/lock/test_demo.py/TestLockDemo.test_locking--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/host.py/Host._event_emit_delayed