• Home
  • Raw
  • Download

Lines Matching refs:assertEqual

87         self.assertEqual(result, parsed)
90 self.assertEqual(t, parsed)
93 self.assertEqual(result2, url)
94 self.assertEqual(result2, result.geturl())
99 self.assertEqual(result3.geturl(), result.geturl())
100 self.assertEqual(result3, result)
101 self.assertEqual(result3.scheme, result.scheme)
102 self.assertEqual(result3.netloc, result.netloc)
103 self.assertEqual(result3.path, result.path)
104 self.assertEqual(result3.params, result.params)
105 self.assertEqual(result3.query, result.query)
106 self.assertEqual(result3.fragment, result.fragment)
107 self.assertEqual(result3.username, result.username)
108 self.assertEqual(result3.password, result.password)
109 self.assertEqual(result3.hostname, result.hostname)
110 self.assertEqual(result3.port, result.port)
114 self.assertEqual(result, split)
117 self.assertEqual(t, split)
119 self.assertEqual(result2, url)
120 self.assertEqual(result2, result.geturl())
124 self.assertEqual(result3.geturl(), result.geturl())
125 self.assertEqual(result3, result)
126 self.assertEqual(result3.scheme, result.scheme)
127 self.assertEqual(result3.netloc, result.netloc)
128 self.assertEqual(result3.path, result.path)
129 self.assertEqual(result3.query, result.query)
130 self.assertEqual(result3.fragment, result.fragment)
131 self.assertEqual(result3.username, result.username)
132 self.assertEqual(result3.password, result.password)
133 self.assertEqual(result3.hostname, result.hostname)
134 self.assertEqual(result3.port, result.port)
139 self.assertEqual(result, expect, "Error parsing %r" % orig)
142 self.assertEqual(result, expect_without_blanks,
148 self.assertEqual(result, expect, "Error parsing %r" % orig)
152 self.assertEqual(result, expect_without_blanks,
230 self.assertEqual(urllib.parse.urljoin(base, relurl), expected)
233 self.assertEqual(urllib.parse.urljoin(baseb, relurlb), expectedb)
239 self.assertEqual(urllib.parse.urlunsplit(urllib.parse.urlsplit(u)), u)
240 self.assertEqual(urllib.parse.urlunparse(urllib.parse.urlparse(u)), u)
292 self.assertEqual(urllib.parse.urlparse('mailto:1337@example.org'),
490 self.assertEqual((urlparsed.hostname, urlparsed.port) , (hostname, port))
520 self.assertEqual(result.geturl(), url)
521 self.assertEqual(result, (defrag, frag))
522 self.assertEqual(result.url, defrag)
523 self.assertEqual(result.fragment, frag)
527 self.assertEqual(p.hostname, "fe80::822a:a8ff:fe49:470c%tESt")
528 self.assertEqual(p.netloc, '[FE80::822a:a8ff:fe49:470c%tESt]:1234')
531 self.assertEqual(p.hostname, b"fe80::822a:a8ff:fe49:470c%tESt")
532 self.assertEqual(p.netloc, b'[FE80::822a:a8ff:fe49:470c%tESt]:1234')
537 self.assertEqual(p.scheme, "http")
538 self.assertEqual(p.netloc, "WWW.PYTHON.ORG")
539 self.assertEqual(p.path, "/doc/")
540 self.assertEqual(p.query, "")
541 self.assertEqual(p.fragment, "frag")
542 self.assertEqual(p.username, None)
543 self.assertEqual(p.password, None)
544 self.assertEqual(p.hostname, "www.python.org")
545 self.assertEqual(p.port, None)
549 self.assertEqual(p.geturl()[4:], url[4:])
553 self.assertEqual(p.scheme, "http")
554 self.assertEqual(p.netloc, "User:Pass@www.python.org:080")
555 self.assertEqual(p.path, "/doc/")
556 self.assertEqual(p.query, "query=yes")
557 self.assertEqual(p.fragment, "frag")
558 self.assertEqual(p.username, "User")
559 self.assertEqual(p.password, "Pass")
560 self.assertEqual(p.hostname, "www.python.org")
561 self.assertEqual(p.port, 80)
562 self.assertEqual(p.geturl(), url)
570 self.assertEqual(p.scheme, "http")
571 self.assertEqual(p.netloc, "User@example.com:Pass@www.python.org:080")
572 self.assertEqual(p.path, "/doc/")
573 self.assertEqual(p.query, "query=yes")
574 self.assertEqual(p.fragment, "frag")
575 self.assertEqual(p.username, "User@example.com")
576 self.assertEqual(p.password, "Pass")
577 self.assertEqual(p.hostname, "www.python.org")
578 self.assertEqual(p.port, 80)
579 self.assertEqual(p.geturl(), url)
584 self.assertEqual(p.scheme, b"http")
585 self.assertEqual(p.netloc, b"WWW.PYTHON.ORG")
586 self.assertEqual(p.path, b"/doc/")
587 self.assertEqual(p.query, b"")
588 self.assertEqual(p.fragment, b"frag")
589 self.assertEqual(p.username, None)
590 self.assertEqual(p.password, None)
591 self.assertEqual(p.hostname, b"www.python.org")
592 self.assertEqual(p.port, None)
593 self.assertEqual(p.geturl()[4:], url[4:])
597 self.assertEqual(p.scheme, b"http")
598 self.assertEqual(p.netloc, b"User:Pass@www.python.org:080")
599 self.assertEqual(p.path, b"/doc/")
600 self.assertEqual(p.query, b"query=yes")
601 self.assertEqual(p.fragment, b"frag")
602 self.assertEqual(p.username, b"User")
603 self.assertEqual(p.password, b"Pass")
604 self.assertEqual(p.hostname, b"www.python.org")
605 self.assertEqual(p.port, 80)
606 self.assertEqual(p.geturl(), url)
610 self.assertEqual(p.scheme, b"http")
611 self.assertEqual(p.netloc, b"User@example.com:Pass@www.python.org:080")
612 self.assertEqual(p.path, b"/doc/")
613 self.assertEqual(p.query, b"query=yes")
614 self.assertEqual(p.fragment, b"frag")
615 self.assertEqual(p.username, b"User@example.com")
616 self.assertEqual(p.password, b"Pass")
617 self.assertEqual(p.hostname, b"www.python.org")
618 self.assertEqual(p.port, 80)
619 self.assertEqual(p.geturl(), url)
639 self.assertEqual(p.netloc, netloc)
651 self.assertEqual(p.netloc, "")
652 self.assertEqual(p.username, None)
653 self.assertEqual(p.password, None)
654 self.assertEqual(p.hostname, None)
655 self.assertEqual(p.port, None)
656 self.assertEqual(p.geturl(), uri)
659 self.assertEqual(p.netloc, "")
660 self.assertEqual(p.username, None)
661 self.assertEqual(p.password, None)
662 self.assertEqual(p.hostname, None)
663 self.assertEqual(p.port, None)
664 self.assertEqual(p.geturl(), uri)
669 self.assertEqual(p.netloc, b"")
670 self.assertEqual(p.username, None)
671 self.assertEqual(p.password, None)
672 self.assertEqual(p.hostname, None)
673 self.assertEqual(p.port, None)
674 self.assertEqual(p.geturl(), uri)
677 self.assertEqual(p.netloc, b"")
678 self.assertEqual(p.username, None)
679 self.assertEqual(p.password, None)
680 self.assertEqual(p.hostname, None)
681 self.assertEqual(p.port, None)
682 self.assertEqual(p.geturl(), uri)
686 self.assertEqual(urllib.parse.urlparse("http://example.com?blahblah=/foo"),
688 self.assertEqual(urllib.parse.urlparse(b"http://example.com?blahblah=/foo"),
696 self.assertEqual(urllib.parse.urlparse("path"),
698 self.assertEqual(urllib.parse.urlparse("//www.python.org:80"),
700 self.assertEqual(urllib.parse.urlparse("http://www.python.org:80"),
703 self.assertEqual(urllib.parse.urlparse(b"path"),
705 self.assertEqual(urllib.parse.urlparse(b"//www.python.org:80"),
707 self.assertEqual(urllib.parse.urlparse(b"http://www.python.org:80"),
712 self.assertEqual(urllib.parse.urlparse("http:80"), ('http','','80','','',''))
713 self.assertEqual(urllib.parse.urlparse("https:80"), ('https','','80','','',''))
714 self.assertEqual(urllib.parse.urlparse("path:80"), ('path','','80','','',''))
715 self.assertEqual(urllib.parse.urlparse("http:"),('http','','','','',''))
716 self.assertEqual(urllib.parse.urlparse("https:"),('https','','','','',''))
717 self.assertEqual(urllib.parse.urlparse("http://www.python.org:80"),
720 self.assertEqual(urllib.parse.urlparse(b"http:80"), (b'http',b'',b'80',b'',b'',b''))
721 self.assertEqual(urllib.parse.urlparse(b"https:80"), (b'https',b'',b'80',b'',b'',b''))
722 self.assertEqual(urllib.parse.urlparse(b"path:80"), (b'path',b'',b'80',b'',b'',b''))
723 self.assertEqual(urllib.parse.urlparse(b"http:"),(b'http',b'',b'',b'',b'',b''))
724 self.assertEqual(urllib.parse.urlparse(b"https:"),(b'https',b'',b'',b'',b'',b''))
725 self.assertEqual(urllib.parse.urlparse(b"http://www.python.org:80"),
734 self.assertEqual(urllib.parse.urlparse("s3://foo.com/stuff"),
736 self.assertEqual(urllib.parse.urlparse("x-newscheme://foo.com/stuff"),
738 self.assertEqual(urllib.parse.urlparse("x-newscheme://foo.com/stuff?query#fragment"),
740 self.assertEqual(urllib.parse.urlparse("x-newscheme://foo.com/stuff?query"),
744 self.assertEqual(urllib.parse.urlparse(b"s3://foo.com/stuff"),
746 self.assertEqual(urllib.parse.urlparse(b"x-newscheme://foo.com/stuff"),
748 self.assertEqual(urllib.parse.urlparse(b"x-newscheme://foo.com/stuff?query#fragment"),
750 self.assertEqual(urllib.parse.urlparse(b"x-newscheme://foo.com/stuff?query"),
758 self.assertEqual(result.scheme, "http")
760 self.assertEqual(result.scheme, b"http")
761 self.assertEqual(func("path", "ftp").scheme, "ftp")
762 self.assertEqual(func("path", scheme="ftp").scheme, "ftp")
763 self.assertEqual(func(b"path", scheme=b"ftp").scheme, b"ftp")
764 self.assertEqual(func("path").scheme, "")
765 self.assertEqual(func(b"path").scheme, b"")
766 self.assertEqual(func(b"path", "").scheme, b"")
788 self.assertEqual(result.fragment, "")
791 self.assertEqual(func(url, "", False).fragment, "")
794 self.assertEqual(result.fragment, expected_frag)
797 self.assertEqual(func(url, "", True).fragment,
799 self.assertEqual(func(url).fragment, expected_frag)
835 self.assertEqual(str_result, str_args)
836 self.assertEqual(bytes_result.decode(), str_args)
837 self.assertEqual(bytes_result.decode(), str_result)
838 self.assertEqual(bytes_result.decode(encoding), str_args)
839 self.assertEqual(bytes_result.decode(encoding), str_result)
840 self.assertEqual(bytes_result.decode(encoding, errors), str_args)
841 self.assertEqual(bytes_result.decode(encoding, errors), str_result)
842 self.assertEqual(bytes_result, bytes_args)
843 self.assertEqual(str_result.encode(), bytes_args)
844 self.assertEqual(str_result.encode(), bytes_result)
845 self.assertEqual(str_result.encode(encoding), bytes_args)
846 self.assertEqual(str_result.encode(encoding), bytes_result)
847 self.assertEqual(str_result.encode(encoding, errors), bytes_args)
848 self.assertEqual(str_result.encode(encoding, errors), bytes_result)
862 self.assertEqual(result, {'key': ['\u0141\xE9']})
864 self.assertEqual(result, {'key': ['\u0141\xE9']})
866 self.assertEqual(result, {'key': ['\u0141\ufffd\ufffd']})
868 self.assertEqual(result, {'key': ['\u0141\ufffd-']})
871 self.assertEqual(result, {'key': ['\u0141-']})
875 self.assertEqual(result, [('key', '\u0141\xE9')])
877 self.assertEqual(result, [('key', '\u0141\xE9')])
879 self.assertEqual(result, [('key', '\u0141\ufffd\ufffd')])
881 self.assertEqual(result, [('key', '\u0141\ufffd-')])
884 self.assertEqual(result, [('key', '\u0141-')])
905 self.assertEqual(result, 'a=trivial')
909 self.assertEqual(result, "a=some+value")
912 self.assertEqual(result, "a=some%20value%2Fanother")
915 self.assertEqual(result, "a=some%20value/another")
920 self.assertEqual(result, 'archaeological%20arcana')
922 self.assertEqual(result, '')
926 self.assertEqual(result, b'abc def')
928 self.assertEqual(result, b'')
937 self.assertEqual(p1.scheme, 'tel')
938 self.assertEqual(p1.path, '+31-641044153')
940 self.assertEqual(p2.scheme, 'tel')
941 self.assertEqual(p2.path, '+31641044153')
944 self.assertEqual(p1.scheme, 'tel')
945 self.assertEqual(p1.path, '+31-641044153')
947 self.assertEqual(p2.scheme, 'tel')
948 self.assertEqual(p2.path, '+31641044153')
962 self.assertEqual(p1.scheme, 'tel')
963 self.assertEqual(p1.path, '123-4')
964 self.assertEqual(p1.params, 'phone-context=+1-650-516')
967 self.assertEqual(p1.scheme, 'tel')
968 self.assertEqual(p1.path, '+1-201-555-0123')
969 self.assertEqual(p1.params, '')
972 self.assertEqual(p1.scheme, 'tel')
973 self.assertEqual(p1.path, '7042')
974 self.assertEqual(p1.params, 'phone-context=example.com')
977 self.assertEqual(p1.scheme, 'tel')
978 self.assertEqual(p1.path, '863-1234')
979 self.assertEqual(p1.params, 'phone-context=+1-914-555')
1036 self.assertEqual(splittype('type:opaquestring'), ('type', 'opaquestring'))
1037 self.assertEqual(splittype('opaquestring'), (None, 'opaquestring'))
1038 self.assertEqual(splittype(':opaquestring'), (None, ':opaquestring'))
1039 self.assertEqual(splittype('type:'), ('type', ''))
1040 self.assertEqual(splittype('type:opaque:string'), ('type', 'opaque:string'))
1044 self.assertEqual(splithost('//www.example.org:80/foo/bar/baz.html'),
1046 self.assertEqual(splithost('//www.example.org:80'),
1048 self.assertEqual(splithost('/foo/bar/baz.html'),
1052 self.assertEqual(splithost('//127.0.0.1#@host.com'),
1054 self.assertEqual(splithost('//127.0.0.1#@host.com:80'),
1056 self.assertEqual(splithost('//127.0.0.1:80#@host.com'),
1060 self.assertEqual(splithost("///file"),
1064 self.assertEqual(splithost("//example.net/file;"),
1066 self.assertEqual(splithost("//example.net/file?"),
1068 self.assertEqual(splithost("//example.net/file#"),
1073 self.assertEqual(splituser('User:Pass@www.python.org:080'),
1075 self.assertEqual(splituser('@www.python.org:080'),
1077 self.assertEqual(splituser('www.python.org:080'),
1079 self.assertEqual(splituser('User:Pass@'),
1081 self.assertEqual(splituser('User@example.com:Pass@www.python.org:080'),
1088 self.assertEqual(splitpasswd('user:ab'), ('user', 'ab'))
1089 self.assertEqual(splitpasswd('user:a\nb'), ('user', 'a\nb'))
1090 self.assertEqual(splitpasswd('user:a\tb'), ('user', 'a\tb'))
1091 self.assertEqual(splitpasswd('user:a\rb'), ('user', 'a\rb'))
1092 self.assertEqual(splitpasswd('user:a\fb'), ('user', 'a\fb'))
1093 self.assertEqual(splitpasswd('user:a\vb'), ('user', 'a\vb'))
1094 self.assertEqual(splitpasswd('user:a:b'), ('user', 'a:b'))
1095 self.assertEqual(splitpasswd('user:a b'), ('user', 'a b'))
1096 self.assertEqual(splitpasswd('user 2:ab'), ('user 2', 'ab'))
1097 self.assertEqual(splitpasswd('user+1:a+b'), ('user+1', 'a+b'))
1098 self.assertEqual(splitpasswd('user:'), ('user', ''))
1099 self.assertEqual(splitpasswd('user'), ('user', None))
1100 self.assertEqual(splitpasswd(':ab'), ('', 'ab'))
1104 self.assertEqual(splitport('parrot:88'), ('parrot', '88'))
1105 self.assertEqual(splitport('parrot'), ('parrot', None))
1106 self.assertEqual(splitport('parrot:'), ('parrot', None))
1107 self.assertEqual(splitport('127.0.0.1'), ('127.0.0.1', None))
1108 self.assertEqual(splitport('parrot:cheese'), ('parrot:cheese', None))
1109 self.assertEqual(splitport('[::1]:88'), ('[::1]', '88'))
1110 self.assertEqual(splitport('[::1]'), ('[::1]', None))
1111 self.assertEqual(splitport(':88'), ('', '88'))
1115 self.assertEqual(splitnport('parrot:88'), ('parrot', 88))
1116 self.assertEqual(splitnport('parrot'), ('parrot', -1))
1117 self.assertEqual(splitnport('parrot', 55), ('parrot', 55))
1118 self.assertEqual(splitnport('parrot:'), ('parrot', -1))
1119 self.assertEqual(splitnport('parrot:', 55), ('parrot', 55))
1120 self.assertEqual(splitnport('127.0.0.1'), ('127.0.0.1', -1))
1121 self.assertEqual(splitnport('127.0.0.1', 55), ('127.0.0.1', 55))
1122 self.assertEqual(splitnport('parrot:cheese'), ('parrot', None))
1123 self.assertEqual(splitnport('parrot:cheese', 55), ('parrot', None))
1129 self.assertEqual(splitquery('http://python.org/fake?foo=bar'),
1131 self.assertEqual(splitquery('http://python.org/fake?foo=bar?'),
1133 self.assertEqual(splitquery('http://python.org/fake'),
1135 self.assertEqual(splitquery('?foo=bar'), ('', 'foo=bar'))
1139 self.assertEqual(splittag('http://example.com?foo=bar#baz'),
1141 self.assertEqual(splittag('http://example.com?foo=bar#'),
1143 self.assertEqual(splittag('#baz'), ('', 'baz'))
1144 self.assertEqual(splittag('http://example.com?foo=bar'),
1146 self.assertEqual(splittag('http://example.com?foo=bar#baz#boo'),
1151 self.assertEqual(splitattr('/path;attr1=value1;attr2=value2'),
1153 self.assertEqual(splitattr('/path;'), ('/path', ['']))
1154 self.assertEqual(splitattr(';attr1=value1;attr2=value2'),
1156 self.assertEqual(splitattr('/path'), ('/path', []))
1162 self.assertEqual(splitvalue('foo=bar'), ('foo', 'bar'))
1163 self.assertEqual(splitvalue('foo='), ('foo', ''))
1164 self.assertEqual(splitvalue('=bar'), ('', 'bar'))
1165 self.assertEqual(splitvalue('foobar'), ('foobar', None))
1166 self.assertEqual(splitvalue('foo=bar=baz'), ('foo', 'bar=baz'))
1170 self.assertEqual(result, 'http://www.python.org')
1178 self.assertEqual(url, 'scheme://host/path')
1186 self.assertEqual(str(cm.warning),
1193 self.assertEqual(str(cm.warning),
1200 self.assertEqual(str(cm.warning),
1207 self.assertEqual(str(cm.warning),
1214 self.assertEqual(str(cm.warning),
1221 self.assertEqual(str(cm.warning),
1228 self.assertEqual(str(cm.warning),
1235 self.assertEqual(str(cm.warning),
1242 self.assertEqual(str(cm.warning),
1249 self.assertEqual(str(cm.warning),
1256 self.assertEqual(str(cm.warning),