OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 import os | |
7 import sys | |
8 import unittest | 6 import unittest |
9 | 7 |
10 import test_env | 8 import test_env |
11 | 9 |
12 from recipe_engine import recipe_api, config | 10 from recipe_engine import recipe_api, config |
13 | 11 |
14 def make_prop(**kwargs): | 12 def make_prop(**kwargs): |
15 name = kwargs.pop('name', "dumb_name") | 13 name = kwargs.pop('name', "dumb_name") |
16 return recipe_api.Property(**kwargs).bind(name, 'test', 'properties_test') | 14 return recipe_api.Property(**kwargs).bind(name, 'test', 'properties_test') |
17 | 15 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 Tests setting a param name correctly carries through to a bound property. | 79 Tests setting a param name correctly carries through to a bound property. |
82 """ | 80 """ |
83 prop = recipe_api.Property(param_name='good_name') | 81 prop = recipe_api.Property(param_name='good_name') |
84 bound = prop.bind('bad.name-time', 'test', 'test_me') | 82 bound = prop.bind('bad.name-time', 'test', 'test_me') |
85 | 83 |
86 self.assertEqual('good_name', bound.param_name) | 84 self.assertEqual('good_name', bound.param_name) |
87 | 85 |
88 | 86 |
89 if __name__ == '__main__': | 87 if __name__ == '__main__': |
90 unittest.main() | 88 unittest.main() |
OLD | NEW |