Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)
Creates a router out of a :class:`dict`.

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/celery/tests/app/test_routes.py   antisocial(Download)
    def test_route_for_task_expanded_route(self):
        expand = E(current_app.amqp.queues)
        route = routes.MapRoute({mytask.name: {'queue': 'foo'}})
        self.assertEqual(
            expand(route.route_for_task(mytask.name))['queue'].name,
    def test_route_for_task(self):
        expand = E(current_app.amqp.queues)
        route = routes.MapRoute({mytask.name: b_queue})
        self.assertDictContainsSubset(
            b_queue,
    def test_expand_route_not_found(self):
        expand = E(current_app.amqp.Queues(
            current_app.conf.CELERY_QUEUES, False))
        route = routes.MapRoute({'a': {'queue': 'x'}})
        with self.assertRaises(QueueNotFound):

src/f/i/firefox-flicks-HEAD/vendor-local/lib/python/celery/tests/app/test_routes.py   firefox-flicks(Download)
    def test_route_for_task_expanded_route(self):
        expand = E(current_app.amqp.queues)
        route = routes.MapRoute({mytask.name: {'queue': 'foo'}})
        self.assertEqual(
            expand(route.route_for_task(mytask.name))['queue'].name,
    def test_route_for_task(self):
        expand = E(current_app.amqp.queues)
        route = routes.MapRoute({mytask.name: b_queue})
        self.assertDictContainsSubset(
            b_queue,
    def test_expand_route_not_found(self):
        expand = E(current_app.amqp.Queues(
            current_app.conf.CELERY_QUEUES, False))
        route = routes.MapRoute({'a': {'queue': 'x'}})
        with self.assertRaises(QueueNotFound):

src/c/e/celery-3.1.11/celery/tests/app/test_routes.py   celery(Download)
    def test_route_for_task_expanded_route(self):
        set_queues(self.app, foo=self.a_queue, bar=self.b_queue)
        expand = E(self.app, self.app.amqp.queues)
        route = routes.MapRoute({self.mytask.name: {'queue': 'foo'}})
        self.assertEqual(
    def test_route_for_task(self):
        set_queues(self.app, foo=self.a_queue, bar=self.b_queue)
        expand = E(self.app, self.app.amqp.queues)
        route = routes.MapRoute({self.mytask.name: self.b_queue})
        self.assertDictContainsSubset(
    def test_expand_route_not_found(self):
        expand = E(self.app, self.app.amqp.Queues(
                   self.app.conf.CELERY_QUEUES, False))
        route = routes.MapRoute({'a': {'queue': 'x'}})
        with self.assertRaises(QueueNotFound):

src/c/e/celery-HEAD/celery/tests/app/test_routes.py   celery(Download)
    def test_route_for_task_expanded_route(self):
        set_queues(self.app, foo=self.a_queue, bar=self.b_queue)
        expand = E(self.app, self.app.amqp.queues)
        route = routes.MapRoute({self.mytask.name: {'queue': 'foo'}})
        self.assertEqual(
    def test_route_for_task(self):
        set_queues(self.app, foo=self.a_queue, bar=self.b_queue)
        expand = E(self.app, self.app.amqp.queues)
        route = routes.MapRoute({self.mytask.name: self.b_queue})
        self.assertDictContainsSubset(
    def test_expand_route_not_found(self):
        expand = E(self.app, self.app.amqp.Queues(
                   self.app.conf.CELERY_QUEUES, False))
        route = routes.MapRoute({'a': {'queue': 'x'}})
        with self.assertRaises(QueueNotFound):