'Test the event for ordering.'

def test_event_entry_exit_right_order(self):

    self.send_message(EVENT_TOPIC, REGION_ENTER_MESSAGE)
    self.assert_location_state('inner')
    self.assert_location_latitude(2.1)
    self.assert_location_accuracy(10.0)
    message = REGION_ENTER_MESSAGE.copy()
    message['desc'] = 'inner_2'
    self.send_message(EVENT_TOPIC, message)
    self.assert_location_state('inner_2')
    self.assert_location_latitude(2.1)
    self.assert_location_accuracy(10.0)
    message = REGION_LEAVE_MESSAGE.copy()
    message['desc'] = 'inner_2'
    self.send_message(EVENT_TOPIC, message)
    self.assert_location_state('inner')
    self.assert_location_latitude(2.1)
    self.assert_location_accuracy(10.0)
    self.send_message(EVENT_TOPIC, REGION_LEAVE_MESSAGE)
    self.assert_location_state('outer')
    self.assert_location_latitude(2.0)
    self.assert_location_accuracy(60.0)
