'Asserts that asking the `router` to route the `content` as a message
from `channel` means it returns consumer `consumer`, optionally
testing it also returns `kwargs` to be passed in
Use `consumer` = None to assert that no route is found.'

def assertRoute(self, router, channel, content, consumer, kwargs=None):

    message = Message(content, channel, channel_layer=u'fake    channel    layer')
    match = router.match(message)
    if (match is None):
        if (consumer is None):
            return
        else:
            self.fail((u'No    route    found    for    %s    on    %s;    expecting    %s' % (content, channel, name_that_thing(consumer))))
    else:
        (mconsumer, mkwargs) = match
        if (consumer is None):
            self.fail((u'Route    found    for    %s    on    %s;    expecting    no    route.' % (content, channel)))
        self.assertEqual(consumer, mconsumer, (u'Route    found    for    %s    on    %s;    but    wrong    consumer    (%s    not    %s).' % (content, channel, name_that_thing(mconsumer), name_that_thing(consumer))))
        if (kwargs is not None):
            self.assertEqual(kwargs, mkwargs, (u'Route    found    for    %s    on    %s;    but    wrong    kwargs    (%s    not    %s).' % (content, channel, mkwargs, kwargs)))
