Beispiel #1
0
 def test_execute_not_found(self, empty_options, empty_suboptions,
                            test_data_source, nonedefault_store):
     empty_options.store = nonedefault_store.path
     with patch("__builtin__.print") as print_patched:
         DataSourceRmCommand.execute(empty_options, empty_suboptions, "xxxx")
         print_patched.assert_called_with("Datasource `xxxx` not found, NOT REMOVED")
Beispiel #2
0
 def test_invalid_params(self, empty_options, empty_suboptions, test_data_source,
                         nonedefault_store):
     empty_options.store = nonedefault_store.path
     # DataSource takes one param
     with pytest.raises(InvalidParams):
         DataSourceRmCommand.execute(empty_options, empty_suboptions)
Beispiel #3
0
 def test_execute(self, empty_options, empty_suboptions, test_data_source, nonedefault_store):
     empty_options.store = nonedefault_store.path
     with patch("__builtin__.print") as print_patched:
         DataSourceRmCommand.execute(empty_options, empty_suboptions, "datasource one")
         print_patched.assert_called_with("Datasource `datasource one` removed")