Esempio n. 1
0
    def test_list_workers_disabled(self):
        Worker.objects.create(
            worker_key='enabled-worker',
            name='enabled-worker',
            enabled=True,
        )

        Worker.objects.create(
            worker_key='disabled-worker',
            name='disabled-worker',
            enabled=False,
        )

        worker_list = client.list_workers(_make_request(), False)
        self.assertEqual(len(worker_list), 1)
        self.assertEqual(worker_list[0], 'disabled-worker')
    def test_list_workers_disabled(self):
        Worker.objects.create(
            worker_key='enabled-worker',
            name='enabled-worker',
            enabled=True,
        )

        Worker.objects.create(
            worker_key='disabled-worker',
            name='disabled-worker',
            enabled=False,
        )

        worker_list = client.list_workers(_make_request(), False)
        self.assertEqual(len(worker_list), 1)
        self.assertEqual(worker_list[0], 'disabled-worker')