| 1 |
|
| 2 |
*** Test in-uri schemes |
| 3 |
|
| 4 |
CFG: {b'x.prefix': b'http://example.org'} |
| 5 |
URI: http://example.org/foo |
| 6 |
('x', 'x') |
| 7 |
URI: http://example.org/foo/bar |
| 8 |
('x', 'x') |
| 9 |
URI: http://example.org/bar |
| 10 |
('x', 'x') |
| 11 |
URI: https://example.org/foo |
| 12 |
abort |
| 13 |
URI: https://example.org/foo/bar |
| 14 |
abort |
| 15 |
URI: https://example.org/bar |
| 16 |
abort |
| 17 |
URI: https://[email protected]/bar |
| 18 |
abort |
| 19 |
URI: https://[email protected]/bar |
| 20 |
abort |
| 21 |
CFG: {b'x.prefix': b'https://example.org'} |
| 22 |
URI: http://example.org/foo |
| 23 |
abort |
| 24 |
URI: http://example.org/foo/bar |
| 25 |
abort |
| 26 |
URI: http://example.org/bar |
| 27 |
abort |
| 28 |
URI: https://example.org/foo |
| 29 |
('x', 'x') |
| 30 |
URI: https://example.org/foo/bar |
| 31 |
('x', 'x') |
| 32 |
URI: https://example.org/bar |
| 33 |
('x', 'x') |
| 34 |
URI: https://[email protected]/bar |
| 35 |
('x', 'x') |
| 36 |
URI: https://[email protected]/bar |
| 37 |
abort |
| 38 |
CFG: {b'x.prefix': b'http://example.org', b'x.schemes': b'https'} |
| 39 |
URI: http://example.org/foo |
| 40 |
('x', 'x') |
| 41 |
URI: http://example.org/foo/bar |
| 42 |
('x', 'x') |
| 43 |
URI: http://example.org/bar |
| 44 |
('x', 'x') |
| 45 |
URI: https://example.org/foo |
| 46 |
abort |
| 47 |
URI: https://example.org/foo/bar |
| 48 |
abort |
| 49 |
URI: https://example.org/bar |
| 50 |
abort |
| 51 |
URI: https://[email protected]/bar |
| 52 |
abort |
| 53 |
URI: https://[email protected]/bar |
| 54 |
abort |
| 55 |
CFG: {b'x.prefix': b'https://example.org', b'x.schemes': b'http'} |
| 56 |
URI: http://example.org/foo |
| 57 |
abort |
| 58 |
URI: http://example.org/foo/bar |
| 59 |
abort |
| 60 |
URI: http://example.org/bar |
| 61 |
abort |
| 62 |
URI: https://example.org/foo |
| 63 |
('x', 'x') |
| 64 |
URI: https://example.org/foo/bar |
| 65 |
('x', 'x') |
| 66 |
URI: https://example.org/bar |
| 67 |
('x', 'x') |
| 68 |
URI: https://[email protected]/bar |
| 69 |
('x', 'x') |
| 70 |
URI: https://[email protected]/bar |
| 71 |
abort |
| 72 |
|
| 73 |
*** Test separately configured schemes |
| 74 |
|
| 75 |
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http'} |
| 76 |
URI: http://example.org/foo |
| 77 |
('x', 'x') |
| 78 |
URI: http://example.org/foo/bar |
| 79 |
('x', 'x') |
| 80 |
URI: http://example.org/bar |
| 81 |
('x', 'x') |
| 82 |
URI: https://example.org/foo |
| 83 |
abort |
| 84 |
URI: https://example.org/foo/bar |
| 85 |
abort |
| 86 |
URI: https://example.org/bar |
| 87 |
abort |
| 88 |
URI: https://[email protected]/bar |
| 89 |
abort |
| 90 |
URI: https://[email protected]/bar |
| 91 |
abort |
| 92 |
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'https'} |
| 93 |
URI: http://example.org/foo |
| 94 |
abort |
| 95 |
URI: http://example.org/foo/bar |
| 96 |
abort |
| 97 |
URI: http://example.org/bar |
| 98 |
abort |
| 99 |
URI: https://example.org/foo |
| 100 |
('x', 'x') |
| 101 |
URI: https://example.org/foo/bar |
| 102 |
('x', 'x') |
| 103 |
URI: https://example.org/bar |
| 104 |
('x', 'x') |
| 105 |
URI: https://[email protected]/bar |
| 106 |
('x', 'x') |
| 107 |
URI: https://[email protected]/bar |
| 108 |
abort |
| 109 |
CFG: {b'x.prefix': b'example.org', b'x.schemes': b'http https'} |
| 110 |
URI: http://example.org/foo |
| 111 |
('x', 'x') |
| 112 |
URI: http://example.org/foo/bar |
| 113 |
('x', 'x') |
| 114 |
URI: http://example.org/bar |
| 115 |
('x', 'x') |
| 116 |
URI: https://example.org/foo |
| 117 |
('x', 'x') |
| 118 |
URI: https://example.org/foo/bar |
| 119 |
('x', 'x') |
| 120 |
URI: https://example.org/bar |
| 121 |
('x', 'x') |
| 122 |
URI: https://[email protected]/bar |
| 123 |
('x', 'x') |
| 124 |
URI: https://[email protected]/bar |
| 125 |
abort |
| 126 |
|
| 127 |
*** Test prefix matching |
| 128 |
|
| 129 |
CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/bar'} |
| 130 |
URI: http://example.org/foo |
| 131 |
('x', 'x') |
| 132 |
URI: http://example.org/foo/bar |
| 133 |
('x', 'x') |
| 134 |
URI: http://example.org/bar |
| 135 |
('y', 'y') |
| 136 |
URI: https://example.org/foo |
| 137 |
abort |
| 138 |
URI: https://example.org/foo/bar |
| 139 |
abort |
| 140 |
URI: https://example.org/bar |
| 141 |
abort |
| 142 |
URI: https://[email protected]/bar |
| 143 |
abort |
| 144 |
URI: https://[email protected]/bar |
| 145 |
abort |
| 146 |
CFG: {b'x.prefix': b'http://example.org/foo', b'y.prefix': b'http://example.org/foo/bar'} |
| 147 |
URI: http://example.org/foo |
| 148 |
('x', 'x') |
| 149 |
URI: http://example.org/foo/bar |
| 150 |
('y', 'y') |
| 151 |
URI: http://example.org/bar |
| 152 |
abort |
| 153 |
URI: https://example.org/foo |
| 154 |
abort |
| 155 |
URI: https://example.org/foo/bar |
| 156 |
abort |
| 157 |
URI: https://example.org/bar |
| 158 |
abort |
| 159 |
URI: https://[email protected]/bar |
| 160 |
abort |
| 161 |
URI: https://[email protected]/bar |
| 162 |
abort |
| 163 |
CFG: {b'x.prefix': b'*', b'y.prefix': b'https://example.org/bar'} |
| 164 |
URI: http://example.org/foo |
| 165 |
abort |
| 166 |
URI: http://example.org/foo/bar |
| 167 |
abort |
| 168 |
URI: http://example.org/bar |
| 169 |
abort |
| 170 |
URI: https://example.org/foo |
| 171 |
('x', 'x') |
| 172 |
URI: https://example.org/foo/bar |
| 173 |
('x', 'x') |
| 174 |
URI: https://example.org/bar |
| 175 |
('y', 'y') |
| 176 |
URI: https://[email protected]/bar |
| 177 |
('x', 'x') |
| 178 |
URI: https://[email protected]/bar |
| 179 |
('y', 'y') |
| 180 |
|
| 181 |
*** Test user matching |
| 182 |
|
| 183 |
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None} |
| 184 |
URI: http://[email protected]/foo |
| 185 |
('y', 'xpassword') |
| 186 |
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'} |
| 187 |
URI: http://[email protected]/foo |
| 188 |
('y', 'ypassword') |
| 189 |
CFG: {b'x.password': b'xpassword', b'x.prefix': b'http://example.org/foo/bar', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://example.org/foo', b'y.username': b'y'} |
| 190 |
URI: http://[email protected]/foo/bar |
| 191 |
('y', 'xpassword') |
| 192 |
|
| 193 |
*** Test user matching with name in prefix |
| 194 |
|
| 195 |
CFG: {b'x.password': b'xpassword', b'x.prefix': b'https://example.org/foo', b'x.username': None, b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo', b'y.username': b'y'} |
| 196 |
URI: http://[email protected]/foo |
| 197 |
('y', 'ypassword') |
| 198 |
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo', b'y.username': b'y'} |
| 199 |
URI: http://[email protected]/foo |
| 200 |
abort |
| 201 |
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo'} |
| 202 |
URI: http://[email protected]/foo |
| 203 |
abort |
| 204 |
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo', b'y.username': b'z'} |
| 205 |
URI: http://[email protected]/foo |
| 206 |
abort |
| 207 |
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo'} |
| 208 |
URI: http://[email protected]/foo |
| 209 |
('y', 'ypassword') |
| 210 |
CFG: {b'y.password': b'ypassword', b'y.prefix': b'http://[email protected]/foo'} |
| 211 |
URI: http://example.org/foo |
| 212 |
abort |
| 213 |
|
| 214 |
*** Test urllib2 and urlutil.url |
| 215 |
|
| 216 |
URIs: http://[email protected]:8080/foo http://example.com:8080/foo |
| 217 |
('user', '') |