|
4 | 4 | from validators import url, ValidationFailure |
5 | 5 |
|
6 | 6 |
|
7 | | -@pytest.mark.parametrize(('address', 'require_tld'), [ |
| 7 | +@pytest.mark.parametrize(('address',), [ |
8 | 8 | ('http://foobar.dk', True), |
9 | 9 | ('http://foobar.dk', True), |
10 | 10 | ('http://foobar.museum/foobar', True), |
11 | 11 | ('http://127.0.0.1/foobar', True), |
12 | 12 | ('http://127.0.0.1:9000/fake', True), |
13 | 13 | ('http://localhost/foobar', False), |
14 | 14 | ('http://foobar', False), |
| 15 | + ('htp://foobar.com', False), |
| 16 | + ('http://foobar..com', False), |
| 17 | + ('http://fo..com', False), |
| 18 | + ('http://fo.com', True), |
15 | 19 | ]) |
16 | | -def test_returns_true_on_valid_url(address, require_tld): |
17 | | - assert url(address, require_tld=require_tld) |
| 20 | +def test_returns_true_on_valid_url(address): |
| 21 | + assert url(address) |
18 | 22 |
|
19 | 23 |
|
20 | 24 | @pytest.mark.parametrize(('address',), [ |
|
0 commit comments