def test_download_no_auth(): from members import mailman2 as mm2 import urllib2 user = '******' password = '******' uri = "http://example.com/" assert mm2._download(uri, user, None) == urllib2.urlopen(uri).read() assert mm2._download(uri, None, password) == urllib2.urlopen(uri).read() assert mm2._download(uri, None, None) == urllib2.urlopen(uri).read()
def test_download_auth(): from members import mailman2 as mm2 import urllib2 # which username and password shoud i use in testor should i use it at all? user = '******' password = '******' uri = "http://example.com/" assert mm2._download(uri, user, password) == urllib2.urlopen(uri).read()