Ejemplo n.º 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))
Ejemplo n.º 2
0
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
Ejemplo n.º 3
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))
Ejemplo n.º 4
0
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