Exemple #1
0
def aggregate_pixels(query) -> None:
    tweet_ids = query.load_results('tweet')
    for tweet_id in tweet_ids:
        t = Tweet(tweet_id)
        query.add_results('pixels', pixels.run(t.media_url))
def test_run_with_a_small_image():
    with mock.patch('processes.pixels.get_image', return_value=draw_image()):
        assert len(list(run('mock', k=1))) == 1
def aggregate_pixels(query) -> None:
    tweet_ids = query.load_results('tweet')
    for tweet_id in tweet_ids:
        t = Tweet(tweet_id)
        query.add_results('pixels', pixels.run(t.media_url))
def test_run_with_a_small_image():
    with mock.patch('processes.pixels.get_image', return_value=draw_image()):
        assert len(list(run('mock', k=1))) == 1