def test_annotations_of_the_same_document_in_different_timeframes(self):
    results = [factories.Annotation(), factories.Annotation(updated=FIFTH_NOVEMBER_1969), factories.Annotation(updated=THIRD_MARCH_1968)]
    document = factories.Document()
    for annotation in results:
        annotation.document = document
    timeframes = bucketing.bucket(results)
    expected_bucket_1 = bucketing.DocumentBucket(document, [results[0]])
    expected_bucket_2 = bucketing.DocumentBucket(document, [results[1]])
    expected_bucket_3 = bucketing.DocumentBucket(document, [results[2]])
    assert (timeframes == [timeframe_with('Last 7 days', {document: expected_bucket_1}), timeframe_with('Nov 1969', {document: expected_bucket_2}), timeframe_with('Mar 1968', {document: expected_bucket_3})])
def test_annotations_of_the_same_document_in_different_timeframes(self):
    results = [factories.Annotation(), factories.Annotation(updated=FIFTH_NOVEMBER_1969), factories.Annotation(updated=THIRD_MARCH_1968)]
    document = factories.Document()
    for annotation in results:
        annotation.document = document
    timeframes = bucketing.bucket(results)
    expected_bucket_1 = bucketing.DocumentBucket(document, [results[0]])
    expected_bucket_2 = bucketing.DocumentBucket(document, [results[1]])
    expected_bucket_3 = bucketing.DocumentBucket(document, [results[2]])
    assert (timeframes == [timeframe_with('Last 7 days', {document: expected_bucket_1}), timeframe_with('Nov 1969', {document: expected_bucket_2}), timeframe_with('Mar 1968', {document: expected_bucket_3})])