def test_mobile_multiple_enter_exit(self):
        # Should only happen if the iphone dies
        enter_message = REGION_ENTER_MESSAGE.copy()
        enter_message['desc'] = IBEACON_DEVICE
        exit_message = REGION_LEAVE_MESSAGE.copy()
        exit_message['desc'] = IBEACON_DEVICE

        self.send_message(EVENT_TOPIC, enter_message)
        self.send_message(EVENT_TOPIC, enter_message)
        self.send_message(EVENT_TOPIC, exit_message)

        self.assertEqual(owntracks.MOBILE_BEACONS_ACTIVE['greg_phone'], [])
Perform a greedy reduction of the token stream.
dataset/ETHPy150Open home-assistant/home-assistant/tests/components/device_tracker/test_owntracks.py/TestDeviceTrackerOwnTracks.test_mobile_multiple_enter_exit--crossover with--dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/openstack/common/policy.py/ParseState.reduce