diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-10-21 14:20:28 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-10-21 14:20:28 +0000 |
commit | 3939691bb4df53f6cfe66435537153e931e67426 (patch) | |
tree | f5af580165616914a068655b4d173d0cb24de808 /saharaclient/tests/unit/osc/v1 | |
parent | 63717036e73c74ea7ea2e812e797c08c978137b4 (diff) | |
parent | 778d8b30b648f638f1999a0eeea14fc6d4c67f1d (diff) | |
download | python-saharaclient-3939691bb4df53f6cfe66435537153e931e67426.tar.gz |
Merge "Changing public/protected options handling"
Diffstat (limited to 'saharaclient/tests/unit/osc/v1')
-rw-r--r-- | saharaclient/tests/unit/osc/v1/test_data_sources.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/saharaclient/tests/unit/osc/v1/test_data_sources.py b/saharaclient/tests/unit/osc/v1/test_data_sources.py index b031a0b..fe3f07a 100644 --- a/saharaclient/tests/unit/osc/v1/test_data_sources.py +++ b/saharaclient/tests/unit/osc/v1/test_data_sources.py @@ -260,7 +260,7 @@ class TestUpdateDataSource(TestDataSources): ('url', 'swift://container.sahara/object'), ('username', 'user'), ('password', 'pass'), ('description', 'Data Source for tests'), - ('public', True), ('protected', True)] + ('is_public', True), ('is_protected', True)] parsed_args = self.check_parser(self.cmd, arglist, verifylist) @@ -283,3 +283,16 @@ class TestUpdateDataSource(TestDataSources): expected_data = ('Data Source for tests', 'id', True, True, 'source', 'swift', 'swift://container.sahara/object') self.assertEqual(expected_data, data) + + def test_data_sources_update_privat_unprotected(self): + arglist = ['source', '--private', '--unprotected'] + verifylist = [('data_source', 'source'), ('is_public', False), + ('is_protected', False)] + + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + + self.cmd.take_action(parsed_args) + + # Check that data source was created with correct arguments + self.ds_mock.update.assert_called_once_with( + 'id', {'is_public': False, 'is_protected': False}) |