def test_fix_url_adds_scheme(): url = "www.coursera.org" assert utils.fix_url(url) == "http://www.coursera.org"
def test_fix_url_removes_spaces(): url = " www.coursera.org " assert utils.fix_url(url) == "http://www.coursera.org"
def test_fix_url_doesnt_alters_empty_url(): url = None assert utils.fix_url(url) is None url = "" assert utils.fix_url(url) == ""
def test_fix_url_ads_sheme(): url = "www.coursera.org" assertEquals(utils.fix_url(url), 'http://www.coursera.org')
def test_fix_url_removes_sheme(): url = " www.coursera.org " assert utils.fix_url(url) == 'http://www.coursera.org'
def test_fix_url_removes_sheme(self): url = " www.coursera.org " self.assertEquals(utils.fix_url(url), 'http://www.coursera.org')
def test_fix_url_doesnt_alters_empty_url(self): url = None self.assertEquals(utils.fix_url(url), None) url = "" self.assertEquals(utils.fix_url(url), "")
def test_fix_url_adds_scheme(): url = "www.coursera.org" assert utils.fix_url(url) == 'http://www.coursera.org'