def test_incontext_link_returns_link_to_first_annotation(self, document, patch):
    incontext_link = patch('h.links.incontext_link')
    bucket = bucketing.DocumentBucket(document)
    ann = factories.Annotation()
    bucket.append(ann)
    request = Mock()
    assert (bucket.incontext_link(request) == incontext_link.return_value)
def test_incontext_link_returns_link_to_first_annotation(self, document, patch):
    incontext_link = patch('h.links.incontext_link')
    bucket = bucketing.DocumentBucket(document)
    ann = factories.Annotation()
    bucket.append(ann)
    request = Mock()
    assert (bucket.incontext_link(request) == incontext_link.return_value)