'Tests the worker won\'t delay an invalid message'

def test_invalid_message(self):

    Channel(u'asgi.delay').send({u'test': u'value'}, immediately=True)
    worker = PatchedWorker(channel_layers[DEFAULT_CHANNEL_LAYER])
    worker.termed = 1
    worker.run()
    self.assertEqual(DelayedMessage.objects.count(), 0)
