Exemplo n.º 1
0
    def test_get_content_calls_request_uri_with_correct_arguments(
            self, mock_request):
        file = File(Mock(), {"file_id": "fake_file_id"})

        file.get_content()

        mock_request.assert_called_with("content", headers={})
Exemplo n.º 2
0
    def test_get_content_calls_request_uri_with_correct_arguments_when_download_link_is_True(
            self, mock_request):
        file = File(Mock(), {"file_id": "fake_file_id"})

        file.get_content(download_link=True)

        mock_request.assert_called_with("content",
                                        headers={"Accept": "text/uri-list"})
Exemplo n.º 3
0
    def test_get_content_calls_request_uri_with_correct_arguments_when_download_link_is_True(self, mock_request):
        file = File(Mock(), {"file_id": "fake_file_id"})

        file.get_content(download_link=True)

        mock_request.assert_called_with("content", headers={"Accept": "text/uri-list"})
Exemplo n.º 4
0
    def test_get_content_calls_request_uri_with_correct_arguments(self, mock_request):
        file = File(Mock(), {"file_id": "fake_file_id"})

        file.get_content()

        mock_request.assert_called_with("content", headers={})