

def test_uris_prefix_type_when_rel(self):
    doc = Document({
        'link': [{
            'href': 'https://example.com',
            'rel': 'canonical',
        }],
    }, claimant='http://example.com')
    expected = [DocumentURI({
        'claimant': 'http://example.com',
        'uri': 'https://example.com',
        'type': 'rel-canonical',
        'content_type': None,
        'created': None,
        'updated': None,
    }), DocumentURI({
        'claimant': 'http://example.com',
        'uri': 'http://example.com',
        'type': 'self-claim',
        'created': None,
        'updated': None,
    })]
    assert (sorted(self.document_uris) == sorted(expected))

dataset/ETHPy150Open hypothesis/h/h/api/models/test/elastic_test.py TestDocument.test_uris_prefix_type_when_rel/VarMisuse@119/207 `doc`->`self`