def test_return_zero(self): ret = main(['update', 'dummy', '--file-id', DUMMY_FILE_ID]) assert ret == 0
def test_with_args(self, subcommand, credentials, cmd_args, exe_args): main(['upload', DUMMY_FILE] + cmd_args) subcommand.upload_to_drive.assert_called_once_with(**exe_args) credentials.assert_called_once_with(None)
def test_with_credentials(self, credentials): main(['upload', DUMMY_FILE, '--credentials', 'path/to/credentials']) credentials.assert_called_once_with('path/to/credentials')
def test_return_zero(self): ret = main(['upload', 'dummy']) assert ret == 0
def test_with_credentials(self, credentials): main(['search', '--credentials', 'path/to/credentials']) credentials.assert_called_once_with('path/to/credentials')
def test_with_args(self, subcommand, credentials, cmd_args, exe_args): main(['search'] + cmd_args) subcommand.search_files.assert_called_once_with(**exe_args) credentials.assert_called_once_with(None)
def test_return_zero(self): ret = main(['search']) assert ret == 0
def test_with_args(self, subcommand, credentials): main(['update', DUMMY_FILE, '--file-id', DUMMY_FILE_ID]) subcommand.update_file.assert_called_once_with(**update_file_args()) credentials.assert_called_once_with(None)