From 65f627148cc37a00b255afc08f7627df965d131f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 28 Feb 2018 06:41:35 -0500 Subject: [PATCH] ds store, better tests Signed-off-by: Kenneth Reitz Signed-off-by: Kenneth Reitz --- .gitignore | 1 + tests/test_requests_html.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index eb66b56..52793b4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] *$py.class +*.DS_Store # C extensions *.so diff --git a/tests/test_requests_html.py b/tests/test_requests_html.py index 1607336..c2c9ad7 100644 --- a/tests/test_requests_html.py +++ b/tests/test_requests_html.py @@ -69,12 +69,12 @@ def test_html_loading(): assert isinstance(html.html, str) -def test_links(): - assert not("#test".startswith('#') and True) is False - assert not("test".startswith('#') and True) is True - assert not("#test".startswith('#') and False) is True - assert not("test".startswith('#') and False) is True +def test_anchor_links(): + r = get() + r.html.skip_anchors = False + + assert '#site-map' in r.html.links if __name__ == '__main__': - test_html_loading() + test_anchor_links()