|
@@ -71,6 +71,35 @@ def test_parse_arguments_with_log_file_verbosity_overrides_default():
|
|
assert global_arguments.log_file_verbosity == -1
|
|
assert global_arguments.log_file_verbosity == -1
|
|
|
|
|
|
|
|
|
|
|
|
+def test_parse_arguments_with_single_override_parses():
|
|
|
|
+ flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
|
|
|
|
+
|
|
|
|
+ arguments = module.parse_arguments('--override', 'foo.bar=baz')
|
|
|
|
+
|
|
|
|
+ global_arguments = arguments['global']
|
|
|
|
+ assert global_arguments.overrides == ['foo.bar=baz']
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def test_parse_arguments_with_multiple_overrides_parses():
|
|
|
|
+ flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
|
|
|
|
+
|
|
|
|
+ arguments = module.parse_arguments('--override', 'foo.bar=baz', 'foo.quux=7')
|
|
|
|
+
|
|
|
|
+ global_arguments = arguments['global']
|
|
|
|
+ assert global_arguments.overrides == ['foo.bar=baz', 'foo.quux=7']
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def test_parse_arguments_with_multiple_overrides_and_flags_parses():
|
|
|
|
+ flexmock(module.collect).should_receive('get_default_config_paths').and_return(['default'])
|
|
|
|
+
|
|
|
|
+ arguments = module.parse_arguments(
|
|
|
|
+ '--override', 'foo.bar=baz', '--override', 'foo.quux=7', 'this.that=8'
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ global_arguments = arguments['global']
|
|
|
|
+ assert global_arguments.overrides == ['foo.bar=baz', 'foo.quux=7', 'this.that=8']
|
|
|
|
+
|
|
|
|
+
|
|
def test_parse_arguments_with_list_json_overrides_default():
|
|
def test_parse_arguments_with_list_json_overrides_default():
|
|
arguments = module.parse_arguments('list', '--json')
|
|
arguments = module.parse_arguments('list', '--json')
|
|
|
|
|