def test_resource_to_html_exception(self, resource): """ Tests the resource_to_html method. """ with pytest.raises(Exception): Fragment.resource_to_html(resource)
def test_resource_to_html(self, resource, expected_html): """ Tests the resource_to_html method. """ actual_html = Fragment.resource_to_html(resource).replace('\n', '') assert actual_html == expected_html