File: test_url.py

package info (click to toggle)
python-easydev 0.13.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: python: 1,904; makefile: 116; javascript: 49
file content (12 lines) | stat: -rw-r--r-- 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from easydev import isurl_reachable

# from nose.plugins.attrib import attr


def test_isurl():
    assert isurl_reachable("www.google.com") == True
    assert isurl_reachable("http://www.google.com") == True
    # assert isurl_reachable("https://fr.yahoo.com") == False # moved
    assert isurl_reachable("wrong.co.ujj") == False
    assert isurl_reachable("http://wrong.co.ujj") == False
    assert isurl_reachable("http://wrong.co") == False