Ejemplo n.º 1
0
def test_scanning_title_provider_unbounded_title():
    """Ensure the provider returns None when the title is unbounded."""
    body = '<html><head><title>TEST</head></html>'
    assert href.scanning_title_provider(body) is None
Ejemplo n.º 2
0
def test_scanning_title_provider_invalid_xhtml():
    """Ensure the provider returns a title even if the content is invalid."""
    body = '<html><head><title>TEST</title></head>'
    assert href.scanning_title_provider(body) == 'TEST'