Example #1
0
    def test_file_get_comments(self):
        client = BoxClient("my_token")

        response = { "total_count": 0, "entries": [] }

        (flexmock(requests)
            .should_receive('request')
            .with_args("get",
                       'https://api.box.com/2.0/files/123/comments',
                       params=None,
                       data=None,
                       headers=client.default_headers)
        .and_return(mocked_response(response)))

        comments = client.get_file_comments(123)
        self.assertEquals(comments, response)