Skip to content

Mock Box does not response correctly to File.update_contents() #150

@kelseymorris95

Description

@kelseymorris95

The structure of an API response during a call to File.update_contents() is documented here:
https://docs.box.com/reference#upload-a-new-version-of-a-file

The documented structure for a response is:
{ "total_count": 1, "entries": [ { "type": "file", ..., } ] }

The current response received from Mock Box for the same API request in test/functional/test_file_upload_update_download.py is:
{ "type": "file", ..., }

Folder also has an upload() method. This method should receive a response object with the same structure as File.update_content()'s documented version, as documented below:
https://docs.box.com/reference#upload-a-file

In this case, a Folder object is built and returned with box_response['entries'][0] as its response_object member.

In File.update_contents(), the response_object member is set to the entire response instead, leading to an inconsistency in the way these two similar operations are handled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions