'Tests that strict mode of enforce_ordering works'

def test_enforce_ordering(self):

    message0 = Message({u'reply_channel': u'test-reply!b', u'order': 0}, u'websocket.connect', channel_layers[DEFAULT_CHANNEL_LAYER])
    message1 = Message({u'reply_channel': u'test-reply!b', u'order': 1}, u'websocket.receive', channel_layers[DEFAULT_CHANNEL_LAYER])
    message2 = Message({u'reply_channel': u'test-reply!b', u'order': 2}, u'websocket.receive', channel_layers[DEFAULT_CHANNEL_LAYER])
    @enforce_ordering
    def inner(message):
        pass
    inner(message0)
    inner(message1)
    inner(message2)
    wait_channel = u'__wait__.test-reply?b'
    next_message = self.get_next_message(wait_channel)
    self.assertEqual(next_message, None)
