-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add yadocs updating #121
Add yadocs updating #121
Conversation
fd6f88d
to
516cf93
Compare
516cf93
to
af4683d
Compare
...ctor_bundle_chs3/dl_connector_bundle_chs3/locales/en/LC_MESSAGES/dl_connector_bundle_chs3.po
Show resolved
Hide resolved
resp = await fu_client.make_request(ReqBuilder.file_sources(file_ids[1])) | ||
sources = resp.json["sources"] | ||
assert not sources[0]["is_applicable"] | ||
assert sources[0]["error"]["code"] == "ERR.FILE.NOT_FOUND" | ||
|
||
resp = await fu_client.make_request(ReqBuilder.source_status(file_ids[1], sources[0]["source_id"])) | ||
assert resp.json["file_id"] == file_ids[1] | ||
assert resp.json["status"] == "failed" | ||
assert resp.json["error"]["code"] == "ERR.FILE.NOT_FOUND" | ||
|
||
# spreadsheet III | ||
resp = await fu_client.make_request(ReqBuilder.file_status(file_ids[2])) | ||
assert resp.status == 200 | ||
assert resp.json["file_id"] == file_ids[2] | ||
assert resp.json["status"] == "failed" | ||
|
||
resp = await fu_client.make_request(ReqBuilder.file_sources(file_ids[2])) | ||
sources = resp.json["sources"] | ||
assert not sources[0]["is_applicable"] | ||
assert sources[0]["error"]["code"] == "ERR.FILE.NOT_FOUND" | ||
|
||
resp = await fu_client.make_request(ReqBuilder.source_status(file_ids[2], sources[0]["source_id"])) | ||
assert resp.json["file_id"] == file_ids[2] | ||
assert resp.json["status"] == "failed" | ||
assert resp.json["error"]["code"] == "ERR.FILE.NOT_FOUND" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no difference for disk api between a non existing file and a public file that was once public but then was restricted, right? So we are testing the same thing.
Maybe then this should then test a private file to which our token doesn't have permissions?
"sources": [ | ||
dict( | ||
id=src_desc.source_id, | ||
title=src_desc.title, | ||
spreadsheet_id=src_desc.spreadsheet_id, | ||
sheet_id=src_desc.sheet_id, | ||
first_line_is_header=src_desc.first_line_is_header, | ||
) | ||
for src_desc in sources_desc | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work if we just feed a list of get_desc
's results here? These file-type branches are starting to get annoying
title=source_title, | ||
raw_schema=raw_schema, | ||
status=source_status, | ||
user_source_dsrc_properties=YaDocsUserSourceDataSourceProperties(sheet_id=sheetname), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sheet_id=sheetname
Well, this is confusing))
If you don't like to call sheet_title
, let's at least leave a comment in YaDocsUserSourceDataSourceProperties and in the connection class, that sheet_id is actually a title of a sheet)
No description provided.