|
@@ -54,11 +54,12 @@ class TestUtilityFunctions(unittest.TestCase):
|
|
no_history=False,
|
|
no_history=False,
|
|
force=False,
|
|
force=False,
|
|
config='foo',
|
|
config='foo',
|
|
|
|
+ protocol_override='https',
|
|
props=[]), response)
|
|
props=[]), response)
|
|
|
|
|
|
response = fetch.handle_args([
|
|
response = fetch.handle_args([
|
|
'filename', '-n', '--dry-run', '--nohooks', '--no-history', '--force',
|
|
'filename', '-n', '--dry-run', '--nohooks', '--no-history', '--force',
|
|
- 'foo', '--some-param=1', '--bar=2'
|
|
|
|
|
|
+ '--protocol-override', 'sso', 'foo', '--some-param=1', '--bar=2'
|
|
])
|
|
])
|
|
self.assertEqual(argparse.Namespace(
|
|
self.assertEqual(argparse.Namespace(
|
|
dry_run=True,
|
|
dry_run=True,
|
|
@@ -66,6 +67,20 @@ class TestUtilityFunctions(unittest.TestCase):
|
|
no_history=True,
|
|
no_history=True,
|
|
force=True,
|
|
force=True,
|
|
config='foo',
|
|
config='foo',
|
|
|
|
+ protocol_override='sso',
|
|
|
|
+ props=['--some-param=1', '--bar=2']), response)
|
|
|
|
+
|
|
|
|
+ response = fetch.handle_args([
|
|
|
|
+ 'filename', '-n', '--dry-run', '--nohooks', '--no-history', '--force',
|
|
|
|
+ '-p', 'sso', 'foo', '--some-param=1', '--bar=2'
|
|
|
|
+ ])
|
|
|
|
+ self.assertEqual(argparse.Namespace(
|
|
|
|
+ dry_run=True,
|
|
|
|
+ nohooks=True,
|
|
|
|
+ no_history=True,
|
|
|
|
+ force=True,
|
|
|
|
+ config='foo',
|
|
|
|
+ protocol_override='sso',
|
|
props=['--some-param=1', '--bar=2']), response)
|
|
props=['--some-param=1', '--bar=2']), response)
|
|
|
|
|
|
@mock.patch('os.path.exists', return_value=False)
|
|
@mock.patch('os.path.exists', return_value=False)
|