Пример #1
0
    def test_simple_http_server_has_correct_tasks(self):
        flow = simple_http_server_flow_factory()

        expected_tasks = (
            'run_simple_webserver',
        )
        self.assertCountEqual(list_tasks_in_flow(flow), expected_tasks)
Пример #2
0
    def test_youtube_dl_flow_factory_has_correct_tasks(self):
        flow = youtube_dl_flow_factory(self.channels)

        expected_tasks = (
            'yt_dl_some_channel1',
            'yt_dl_some_other_channel2',
        )
        self.assertCountEqual(list_tasks_in_flow(flow), expected_tasks)
Пример #3
0
    def test_list_tasks_in_flow_returns_two_items_if_two_items_in_flow(self):
        ret = list_tasks_in_flow(self.flow_3)

        print(list(self.flow_3.iter_nodes()))
        expected_list = ['task1', 'task2']
        self.assertEqual(ret, expected_list)
Пример #4
0
    def test_list_tasks_in_flow_returns_one_item_if_one_item_in_flow(self):
        ret = list_tasks_in_flow(self.flow_2)

        expected_list = ['task1']
        self.assertEqual(ret, expected_list)
Пример #5
0
    def test_list_tasks_in_flow_returns_empty_list_for_empty_flow(self):
        ret = list_tasks_in_flow(self.flow_1)

        self.assertEqual(ret, list())