@@ -947,65 +947,65 @@ def test_invalid_port(self):
947
947
948
948
def test_idna (self ):
949
949
u1 = URL .from_text ('http://bücher.ch' )
950
- self .assertEquals (u1 .host , 'bücher.ch' )
951
- self .assertEquals (u1 .to_text (), 'http://bücher.ch' )
952
- self .assertEquals (u1 .to_uri ().to_text (), 'http://xn--bcher-kva.ch' )
950
+ self .assertEqual (u1 .host , 'bücher.ch' )
951
+ self .assertEqual (u1 .to_text (), 'http://bücher.ch' )
952
+ self .assertEqual (u1 .to_uri ().to_text (), 'http://xn--bcher-kva.ch' )
953
953
954
954
u2 = URL .from_text ('https://xn--bcher-kva.ch' )
955
- self .assertEquals (u2 .host , 'xn--bcher-kva.ch' )
956
- self .assertEquals (u2 .to_text (), 'https://xn--bcher-kva.ch' )
957
- self .assertEquals (u2 .to_iri ().to_text (), u'https://bücher.ch' )
955
+ self .assertEqual (u2 .host , 'xn--bcher-kva.ch' )
956
+ self .assertEqual (u2 .to_text (), 'https://xn--bcher-kva.ch' )
957
+ self .assertEqual (u2 .to_iri ().to_text (), u'https://bücher.ch' )
958
958
959
959
def test_netloc_slashes (self ):
960
960
# basic sanity checks
961
961
url = URL .from_text ('mailto:mahmoud@hatnote.com' )
962
- self .assertEquals (url .scheme , 'mailto' )
963
- self .assertEquals (url .to_text (), 'mailto:mahmoud@hatnote.com' )
962
+ self .assertEqual (url .scheme , 'mailto' )
963
+ self .assertEqual (url .to_text (), 'mailto:mahmoud@hatnote.com' )
964
964
965
965
url = URL .from_text ('http://hatnote.com' )
966
- self .assertEquals (url .scheme , 'http' )
967
- self .assertEquals (url .to_text (), 'http://hatnote.com' )
966
+ self .assertEqual (url .scheme , 'http' )
967
+ self .assertEqual (url .to_text (), 'http://hatnote.com' )
968
968
969
969
# test that unrecognized schemes stay consistent with '//'
970
970
url = URL .from_text ('newscheme:a:b:c' )
971
- self .assertEquals (url .scheme , 'newscheme' )
972
- self .assertEquals (url .to_text (), 'newscheme:a:b:c' )
971
+ self .assertEqual (url .scheme , 'newscheme' )
972
+ self .assertEqual (url .to_text (), 'newscheme:a:b:c' )
973
973
974
974
url = URL .from_text ('newerscheme://a/b/c' )
975
- self .assertEquals (url .scheme , 'newerscheme' )
976
- self .assertEquals (url .to_text (), 'newerscheme://a/b/c' )
975
+ self .assertEqual (url .scheme , 'newerscheme' )
976
+ self .assertEqual (url .to_text (), 'newerscheme://a/b/c' )
977
977
978
978
# test that reasonable guesses are made
979
979
url = URL .from_text ('git+ftp://gitstub.biz/glyph/lefkowitz' )
980
- self .assertEquals (url .scheme , 'git+ftp' )
981
- self .assertEquals (url .to_text (),
980
+ self .assertEqual (url .scheme , 'git+ftp' )
981
+ self .assertEqual (url .to_text (),
982
982
'git+ftp://gitstub.biz/glyph/lefkowitz' )
983
983
984
984
url = URL .from_text ('what+mailto:freerealestate@enotuniq.org' )
985
- self .assertEquals (url .scheme , 'what+mailto' )
986
- self .assertEquals (url .to_text (),
985
+ self .assertEqual (url .scheme , 'what+mailto' )
986
+ self .assertEqual (url .to_text (),
987
987
'what+mailto:freerealestate@enotuniq.org' )
988
988
989
989
url = URL (scheme = 'ztp' , path = ('x' , 'y' , 'z' ), rooted = True )
990
- self .assertEquals (url .to_text (), 'ztp:/x/y/z' )
990
+ self .assertEqual (url .to_text (), 'ztp:/x/y/z' )
991
991
992
992
# also works when the input doesn't include '//'
993
993
url = URL (scheme = 'git+ftp' , path = ('x' , 'y' , 'z' ,'' ),
994
994
rooted = True , uses_netloc = True )
995
995
# broken bc urlunsplit
996
- self .assertEquals (url .to_text (), 'git+ftp:///x/y/z/' )
996
+ self .assertEqual (url .to_text (), 'git+ftp:///x/y/z/' )
997
997
998
998
# really why would this ever come up but ok
999
999
url = URL .from_text ('file:///path/to/heck' )
1000
1000
url2 = url .replace (scheme = 'mailto' )
1001
- self .assertEquals (url2 .to_text (), 'mailto:/path/to/heck' )
1001
+ self .assertEqual (url2 .to_text (), 'mailto:/path/to/heck' )
1002
1002
1003
1003
url_text = 'unregisteredscheme:///a/b/c'
1004
1004
url = URL .from_text (url_text )
1005
1005
no_netloc_url = url .replace (uses_netloc = False )
1006
- self .assertEquals (no_netloc_url .to_text (), 'unregisteredscheme:/a/b/c' )
1006
+ self .assertEqual (no_netloc_url .to_text (), 'unregisteredscheme:/a/b/c' )
1007
1007
netloc_url = url .replace (uses_netloc = True )
1008
- self .assertEquals (netloc_url .to_text (), url_text )
1008
+ self .assertEqual (netloc_url .to_text (), url_text )
1009
1009
1010
1010
return
1011
1011
0 commit comments