def test_recent_and_older_annotations_together(self):
    results = [factories.Annotation(target_uri='http://example1.com'), factories.Annotation(target_uri='http://example2.com'), factories.Annotation(target_uri='http://example3.com'), factories.Annotation(target_uri='http://example4.com', updated=THIRD_MARCH_1968), factories.Annotation(target_uri='http://example5.com', updated=THIRD_MARCH_1968), factories.Annotation(target_uri='http://example6.com', updated=THIRD_MARCH_1968)]
    timeframes = bucketing.bucket(results)
    expected_bucket_1 = bucketing.DocumentBucket(results[0].document, [results[0]])
    expected_bucket_2 = bucketing.DocumentBucket(results[1].document, [results[1]])
    expected_bucket_3 = bucketing.DocumentBucket(results[2].document, [results[2]])
    expected_bucket_4 = bucketing.DocumentBucket(results[3].document, [results[3]])
    expected_bucket_5 = bucketing.DocumentBucket(results[4].document, [results[4]])
    expected_bucket_6 = bucketing.DocumentBucket(results[5].document, [results[5]])
    assert (timeframes == [timeframe_with('Last 7 days', {results[0].document: expected_bucket_1, results[1].document: expected_bucket_2, results[2].document: expected_bucket_3}), timeframe_with('Mar 1968', {results[3].document: expected_bucket_4, results[4].document: expected_bucket_5, results[5].document: expected_bucket_6})])
def test_recent_and_older_annotations_together(self):
    results = [factories.Annotation(target_uri='http://example1.com'), factories.Annotation(target_uri='http://example2.com'), factories.Annotation(target_uri='http://example3.com'), factories.Annotation(target_uri='http://example4.com', updated=THIRD_MARCH_1968), factories.Annotation(target_uri='http://example5.com', updated=THIRD_MARCH_1968), factories.Annotation(target_uri='http://example6.com', updated=THIRD_MARCH_1968)]
    timeframes = bucketing.bucket(results)
    expected_bucket_1 = bucketing.DocumentBucket(results[0].document, [results[0]])
    expected_bucket_2 = bucketing.DocumentBucket(results[1].document, [results[1]])
    expected_bucket_3 = bucketing.DocumentBucket(results[2].document, [results[2]])
    expected_bucket_4 = bucketing.DocumentBucket(results[3].document, [results[3]])
    expected_bucket_5 = bucketing.DocumentBucket(results[4].document, [results[4]])
    expected_bucket_6 = bucketing.DocumentBucket(results[5].document, [results[5]])
    assert (timeframes == [timeframe_with('Last 7 days', {results[0].document: expected_bucket_1, results[1].document: expected_bucket_2, results[2].document: expected_bucket_3}), timeframe_with('Mar 1968', {results[3].document: expected_bucket_4, results[4].document: expected_bucket_5, results[5].document: expected_bucket_6})])