'Test that the StaticFilesConsumer is used in debug mode.'

def test_debug(self, mock_worker):

    with self.settings(DEBUG=True, STATIC_URL=u'/static/', INSTALLED_APPS=[u'channels', u'django.contrib.staticfiles']):
        call_command(u'runworker', u'--layer', u'fake_channel')
        mock_worker.assert_called_with(only_channels=None, exclude_channels=None, callback=None, channel_layer=mock.ANY)
        channel_layer = mock_worker.call_args[1][u'channel_layer']
        static_consumer = channel_layer.router.root.routing[0].consumer
        self.assertIsInstance(static_consumer, StaticFilesConsumer)
