'Initialises in memory channel layer for the duration of the test'

def _pre_setup(self):

    super(ChannelTestCaseMixin, self)._pre_setup()
    self._old_layers = {}
    for alias in self.test_channel_aliases:
        self._old_layers[alias] = channel_layers.set(alias, ChannelLayerWrapper(InMemoryChannelLayer(), alias, channel_layers[alias].routing[:]))
