def test_annotations_from_different_days_in_same_month(self):
    '\n        Test bucketing multiple annotations from different days of same month.\n\n        Annotations from different days of the same month should go into one\n        bucket.\n\n        '
    one_month_ago = (UTCNOW - datetime.timedelta(days=30))
    annotations = [factories.Annotation(target_uri='http://example.com', updated=one_month_ago), factories.Annotation(target_uri='http://example.com', updated=(one_month_ago - datetime.timedelta(days=1))), factories.Annotation(target_uri='http://example.com', updated=(one_month_ago - datetime.timedelta(days=2)))]
    timeframes = bucketing.bucket(annotations)
    expected_bucket = bucketing.DocumentBucket(annotations[0].document)
    expected_bucket.update(annotations)
    assert (timeframes == [timeframe_with('Jan 1970', {annotations[0].document: expected_bucket})])
Test bucketing multiple annotations from different days of same month.

Annotations from different days of the same month should go into one
bucket.
def test_annotations_from_different_days_in_same_month(self):
    '\n        Test bucketing multiple annotations from different days of same month.\n\n        Annotations from different days of the same month should go into one\n        bucket.\n\n        '
    one_month_ago = (UTCNOW - datetime.timedelta(days=30))
    annotations = [factories.Annotation(target_uri='http://example.com', updated=one_month_ago), factories.Annotation(target_uri='http://example.com', updated=(one_month_ago - datetime.timedelta(days=1))), factories.Annotation(target_uri='http://example.com', updated=(one_month_ago - datetime.timedelta(days=2)))]
    timeframes = bucketing.bucket(annotations)
    expected_bucket = bucketing.DocumentBucket(annotations[0].document)
    expected_bucket.update(annotations)
    assert (timeframes == [timeframe_with('Jan 1970', {annotations[0].document: expected_bucket})])