test: add test_webxdc_download_on_demand

The test checks that if webxdc update is too large to
download with the current `download_limit`,
it is applied afterwards when the user manually downloads the update message.
This commit is contained in:
link2xt
2023-07-20 01:00:14 +00:00
parent bc73c16df7
commit fbd2fc8ead
2 changed files with 31 additions and 0 deletions

View File

@@ -486,6 +486,9 @@ class Message:
dc_msg = ffi.gc(lib.dc_get_msg(self.account._dc_context, self.id), lib.dc_msg_unref)
return lib.dc_msg_get_download_state(dc_msg)
def download_full(self) -> None:
lib.dc_download_full_msg(self.account._dc_context, self.id)
# some code for handling DC_MSG_* view types