Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: recipe_modules/url/tests/validate_url.py

Issue 2868333004: Add URL recipe module from "depot_tools". (Closed)
Patch Set: Update comments with exceptions Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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'))
OLDNEW
« no previous file with comments | « recipe_modules/url/tests/join.expected/basic.json ('k') | recipe_modules/url/tests/validate_url.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698