OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. |
| 4 |
| 5 DEPS = [ |
| 6 'properties', |
| 7 'step', |
| 8 'url', |
| 9 ] |
| 10 |
| 11 |
| 12 def RunSteps(api): |
| 13 api.url.validate_url(api.properties['url_to_validate']) |
| 14 |
| 15 |
| 16 def GenTests(api): |
| 17 yield (api.test('basic') + |
| 18 api.properties(url_to_validate='https://example.com')) |
| 19 |
| 20 yield (api.test('no_scheme') + |
| 21 api.properties(url_to_validate='example.com') + |
| 22 api.expect_exception('ValueError')) |
| 23 |
| 24 yield (api.test('invalid_scheme') + |
| 25 api.properties(url_to_validate='ftp://example.com') + |
| 26 api.expect_exception('ValueError')) |
| 27 |
| 28 yield (api.test('no_host') + |
| 29 api.properties(url_to_validate='https://') + |
| 30 api.expect_exception('ValueError')) |
OLD | NEW |