Creates a mock HttpError with a 404 status code.
()
| 21 | |
| 22 | |
| 23 | def NotFoundError() -> googleapiclient.errors.HttpError: |
| 24 | """Creates a mock HttpError with a 404 status code.""" |
| 25 | resp = httplib2.Response({'status': '404', 'reason': 'Not Found'}) |
| 26 | content = json.dumps({'error': {'code': 404, 'message': 'Not Found'}}).encode( |
| 27 | 'utf-8' |
| 28 | ) |
| 29 | return googleapiclient.errors.HttpError(resp, content) |
| 30 | |
| 31 | |
| 32 | def NewFolderAsset( |
no test coverage detected