test_util.py 515 B

12345678910
  1. from archivebox import util
  2. def test_download_url_downloads_content():
  3. text = util.download_url("http://127.0.0.1:8080/static/example.com.html")
  4. assert "Example Domain" in text
  5. def test_download_url_gets_encoding_from_body():
  6. text = util.download_url("http://127.0.0.1:8080/static_no_content_type/shift_jis.html")
  7. assert "鹿児島のニュース|MBC南日本放送" in text
  8. assert "掲載された全ての記事・画像等の無断転載、二次利用をお断りいたします" in text