예제 #1
0
 def test_return_zero(self):
     ret = main(['update', 'dummy', '--file-id', DUMMY_FILE_ID])
     assert ret == 0
예제 #2
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)
예제 #3
0
 def test_with_credentials(self, credentials):
     main(['upload', DUMMY_FILE, '--credentials', 'path/to/credentials'])
     credentials.assert_called_once_with('path/to/credentials')
예제 #4
0
 def test_return_zero(self):
     ret = main(['upload', 'dummy'])
     assert ret == 0
예제 #5
0
 def test_with_credentials(self, credentials):
     main(['search', '--credentials', 'path/to/credentials'])
     credentials.assert_called_once_with('path/to/credentials')
예제 #6
0
 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)
예제 #7
0
 def test_return_zero(self):
     ret = main(['search'])
     assert ret == 0
예제 #8
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)