From 4a4872c9ed6880e77de9519a6ffca671217cc059 Mon Sep 17 00:00:00 2001 From: Sebastian Molenda Date: Wed, 11 Dec 2024 13:15:39 +0100 Subject: [PATCH] Rework invocation of requests --- .pubnub.yml | 26 +- README.md | 7 +- pubnub/crypto.py | 2 + .../file_operations/download_file.py | 4 +- .../file_operations/send_file_asyncio.py | 32 +- pubnub/pubnub_asyncio.py | 23 +- pubnub/pubnub_core.py | 4 +- pubnub/request_handlers/requests_handler.py | 25 +- setup.py | 9 +- tests/helper.py | 4 +- .../integrational/asyncio/test_file_upload.py | 25 +- ...nd_download_encrypted_file_cipher_key.json | 223 ++++---------- ...download_encrypted_file_crypto_module.json | 223 ++++---------- .../file_upload/send_and_download_file.json | 220 +++----------- .../native_sync/file_upload/delete_file.yaml | 182 ------------ .../file_upload/download_file.yaml | 231 --------------- .../file_upload/download_file_encrypted.yaml | 259 ----------------- .../native_sync/file_upload/download_url.yaml | 182 ------------ .../download_url_check_auth_key_in_url.yaml | 34 --- .../file_upload/fetch_file_upload_data.yaml | 58 ---- .../file_size_exceeded_maximum_size.yaml | 97 ------- .../native_sync/file_upload/list_files.yaml | 41 --- .../file_upload/publish_file_message.yaml | 36 --- .../publish_file_message_encrypted.yaml | 36 --- .../publish_file_message_with_ptto.yaml | 36 --- ...wnload_encrypted_file_fallback_decode.json | 273 ++---------------- .../send_and_download_gcm_encrypted_file.json | 273 ++---------------- .../file_upload/send_file_with_ptto.yaml | 150 ---------- .../test_publish_file_with_custom_type.json | 44 +-- .../native_sync/history/not_permitted.yaml | 25 -- .../native_sync/test_file_upload.py | 152 +++++----- .../integrational/native_sync/test_history.py | 7 +- tests/integrational/native_sync/test_state.py | 6 +- tests/integrational/vcr_helper.py | 2 + tests/integrational/vcr_serializer.py | 9 +- tests/pytest.ini | 2 + 36 files changed, 390 insertions(+), 2572 deletions(-) delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/delete_file.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/download_file.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/download_url.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/list_files.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/publish_file_message.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.yaml delete mode 100644 tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.yaml delete mode 100644 tests/integrational/fixtures/native_sync/history/not_permitted.yaml diff --git a/.pubnub.yml b/.pubnub.yml index e8fba1d1..ce691879 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -61,12 +61,6 @@ sdks: - x86 - x86-64 requires: - - name: requests - min-version: "2.4" - location: https://pypi.org/project/requests/ - license: Apache Software License (Apache 2.0) - license-url: https://github.com/psf/requests/blob/master/LICENSE - is-required: Required - name: pycryptodomex min-version: "3.3" location: https://pypi.org/project/pycryptodomex/ @@ -79,11 +73,11 @@ sdks: license: MIT License (MIT) license-url: https://github.com/agronholm/cbor2/blob/master/LICENSE.txt is-required: Required - - name: aiohttp - min-version: "2.3.10" - location: https://pypi.org/project/aiohttp/ - license: Apache Software License (Apache 2) - license-url: https://github.com/aio-libs/aiohttp/blob/master/LICENSE.txt + - name: httpx + min-version: "0.28.0" + location: https://pypi.org/project/httpx/ + license: BSD License (BSD-3-Clause) + license-url: https://github.com/encode/httpx/blob/master/LICENSE.md is-required: Required - language: python @@ -162,11 +156,11 @@ sdks: license-url: https://github.com/agronholm/cbor2/blob/master/LICENSE.txt is-required: Required - - name: aiohttp - min-version: "2.3.10" - location: https://pypi.org/project/aiohttp/ - license: Apache Software License (Apache 2) - license-url: https://github.com/aio-libs/aiohttp/blob/master/LICENSE.txt + name: httpx + min-version: "0.28.0" + location: https://pypi.org/project/httpx/ + license: BSD License (BSD-3-Clause) + license-url: https://github.com/encode/httpx/blob/master/LICENSE.md is-required: Required changelog: - date: 2024-11-19 diff --git a/README.md b/README.md index e548c8d9..e713b1fd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your ## Configure PubNub 1. Integrate the Python SDK into your project using `pip`: - + ```bash pip install pubnub ``` @@ -83,9 +83,8 @@ pubnub.subscribe().channels('my_channel').execute() ## Documentation -* [Build your first realtime Python app with PubNub](https://www.pubnub.com/docs/platform/quickstarts/python) -* [API reference for Python](https://www.pubnub.com/docs/python/pubnub-python-sdk) -* [API reference for Python (asyncio)](https://www.pubnub.com/docs/python-aiohttp/pubnub-python-sdk) +* [Build your first realtime Python app with PubNub](https://www.pubnub.com/docs/general/basics/set-up-your-account) +* [API reference for Python](https://www.pubnub.com/docs/sdks/python) ## Support diff --git a/pubnub/crypto.py b/pubnub/crypto.py index f61269f5..095c8fd2 100644 --- a/pubnub/crypto.py +++ b/pubnub/crypto.py @@ -104,6 +104,8 @@ def decrypt(self, key, file, use_random_iv=True): cipher = AES.new(bytes(secret[0:32], "utf-8"), self.mode, initialization_vector) result = unpad(cipher.decrypt(extracted_file), 16) except ValueError: + if not self.fallback_mode: # No fallback mode so we return the original content + return file cipher = AES.new(bytes(secret[0:32], "utf-8"), self.fallback_mode, initialization_vector) result = unpad(cipher.decrypt(extracted_file), 16) diff --git a/pubnub/endpoints/file_operations/download_file.py b/pubnub/endpoints/file_operations/download_file.py index 3436d668..8bdddf87 100644 --- a/pubnub/endpoints/file_operations/download_file.py +++ b/pubnub/endpoints/file_operations/download_file.py @@ -5,6 +5,7 @@ from pubnub.request_handlers.requests_handler import RequestsRequestHandler from pubnub.endpoints.file_operations.get_file_url import GetFileDownloadUrl from warnings import warn +from urllib.parse import urlparse, parse_qs class DownloadFileNative(FileOperationEndpoint): @@ -69,7 +70,8 @@ def use_base_path(self): return False def build_params_callback(self): - return lambda a: {} + params = parse_qs(urlparse(self._download_data.result.file_url).query) + return lambda a: {key: str(params[key][0]) for key in params.keys()} def name(self): return "Downloading file" diff --git a/pubnub/endpoints/file_operations/send_file_asyncio.py b/pubnub/endpoints/file_operations/send_file_asyncio.py index 5ecf7db0..b6f65e80 100644 --- a/pubnub/endpoints/file_operations/send_file_asyncio.py +++ b/pubnub/endpoints/file_operations/send_file_asyncio.py @@ -4,27 +4,25 @@ class AsyncioSendFile(SendFileNative): - def options(self): - request_options = super(SendFileNative, self).options() - request_options.data = request_options.files - return request_options - async def future(self): - self._file_upload_envelope = await FetchFileUploadS3Data(self._pubnub).\ - channel(self._channel).\ - file_name(self._file_name).future() + self._file_upload_envelope = await FetchFileUploadS3Data(self._pubnub) \ + .channel(self._channel) \ + .file_name(self._file_name).future() response_envelope = await super(SendFileNative, self).future() - publish_file_response = await PublishFileMessage(self._pubnub).\ - channel(self._channel).\ - meta(self._meta).\ - message(self._message).\ - file_id(response_envelope.result.file_id).\ - file_name(response_envelope.result.name).\ - should_store(self._should_store).\ - ttl(self._ttl).\ - cipher_key(self._cipher_key).future() + publish_file_response = await PublishFileMessage(self._pubnub) \ + .channel(self._channel) \ + .meta(self._meta) \ + .message(self._message) \ + .file_id(response_envelope.result.file_id) \ + .file_name(response_envelope.result.name) \ + .should_store(self._should_store) \ + .ttl(self._ttl) \ + .replicate(self._replicate) \ + .ptto(self._ptto) \ + .custom_message_type(self._custom_message_type) \ + .cipher_key(self._cipher_key).future() response_envelope.result.timestamp = publish_file_response.result.timestamp return response_envelope diff --git a/pubnub/pubnub_asyncio.py b/pubnub/pubnub_asyncio.py index 62d7d494..d817cd54 100644 --- a/pubnub/pubnub_asyncio.py +++ b/pubnub/pubnub_asyncio.py @@ -7,7 +7,6 @@ import urllib from asyncio import Event, Queue, Semaphore -from yarl import URL from httpx import AsyncHTTPTransport from pubnub.event_engine.containers import PresenceStateContainer from pubnub.event_engine.models import events, states @@ -180,7 +179,8 @@ async def _request_helper(self, options_func, cancellation_event): else: url = utils.build_url(scheme="", origin="", path=options.path, params=options.query_string) - url = str(URL(url, encoded=True)) + full_url = httpx.URL(url, query=options.query_string.encode('utf-8')) + logger.debug("%s %s %s" % (options.method_string, url, options.data)) if options.request_headers: @@ -188,18 +188,23 @@ async def _request_helper(self, options_func, cancellation_event): else: request_headers = self.headers + request_arguments = { + 'method': options.method_string, + 'headers': request_headers, + 'url': full_url, + 'follow_redirects': options.allow_redirects, + 'timeout': (options.connect_timeout, options.request_timeout), + } + if options.is_post() or options.is_patch(): + request_arguments['content'] = options.data + request_arguments['files'] = options.files + try: if not self._session: await self.create_session() start_timestamp = time.time() response = await asyncio.wait_for( - self._session.request( - options.method_string, - url, - headers=request_headers, - data=options.data if options.data else None, - follow_redirects=options.allow_redirects - ), + self._session.request(**request_arguments), options.request_timeout ) except (asyncio.TimeoutError, asyncio.CancelledError): diff --git a/pubnub/pubnub_core.py b/pubnub/pubnub_core.py index f630acd1..90dc215d 100644 --- a/pubnub/pubnub_core.py +++ b/pubnub/pubnub_core.py @@ -225,7 +225,7 @@ def publish(self, channel: str = None, message: any = None, should_store: Option def grant(self): """ Deprecated. Use grant_token instead """ - warn("This method will stop working on 31th December 2024. We recommend that you use grant_token() instead.", + warn("Access management v2 is being deprecated. We recommend switching to grant_token().", DeprecationWarning, stacklevel=2) return Grant(self) @@ -240,7 +240,7 @@ def revoke_token(self, token: str) -> RevokeToken: def audit(self): """ Deprecated """ - warn("This method will stop working on 31th December 2024.", DeprecationWarning, stacklevel=2) + warn("Access management v2 is being deprecated.", DeprecationWarning, stacklevel=2) return Audit(self) # Push Related methods diff --git a/pubnub/request_handlers/requests_handler.py b/pubnub/request_handlers/requests_handler.py index a1ef6fd3..7a77a728 100644 --- a/pubnub/request_handlers/requests_handler.py +++ b/pubnub/request_handlers/requests_handler.py @@ -1,6 +1,5 @@ import logging import threading -import requests import httpx import json # noqa # pylint: disable=W0611 import urllib @@ -237,14 +236,13 @@ def _invoke_request(self, p_options, e_options, base_origin): args = { "method": e_options.method_string, "headers": request_headers, - "url": url, - "params": e_options.query_string, + "url": httpx.URL(url, query=e_options.query_string.encode("utf-8")), "timeout": (e_options.connect_timeout, e_options.request_timeout), "follow_redirects": e_options.allow_redirects } if e_options.is_post() or e_options.is_patch(): - args["data"] = e_options.data + args["content"] = e_options.data args["files"] = e_options.files logger.debug("%s %s %s" % ( e_options.method_string, @@ -265,32 +263,33 @@ def _invoke_request(self, p_options, e_options, base_origin): try: res = self.session.request(**args) logger.debug("GOT %s" % res.text) - except requests.exceptions.ConnectionError as e: + + except httpx.ConnectError as e: raise PubNubException( pn_error=PNERR_CONNECTION_ERROR, errormsg=str(e) ) - except requests.exceptions.HTTPError as e: - raise PubNubException( - pn_error=PNERR_HTTP_ERROR, - errormsg=str(e) - ) - except requests.exceptions.Timeout as e: + except httpx.TimeoutException as e: raise PubNubException( pn_error=PNERR_CLIENT_TIMEOUT, errormsg=str(e) ) - except requests.exceptions.TooManyRedirects as e: + except httpx.TooManyRedirects as e: raise PubNubException( pn_error=PNERR_TOO_MANY_REDIRECTS_ERROR, errormsg=str(e) ) + except httpx.HTTPStatusError as e: + raise PubNubException( + pn_error=PNERR_HTTP_ERROR, + errormsg=str(e), + status_code=e.response.status_code + ) except Exception as e: raise PubNubException( pn_error=PNERR_UNKNOWN_ERROR, errormsg=str(e) ) - return res diff --git a/setup.py b/setup.py index 6c86c082..4511e64f 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,9 @@ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: Implementation :: CPython', 'License :: Other/Proprietary License', 'Operating System :: OS Independent', @@ -30,10 +33,8 @@ python_requires='>=3.7', install_requires=[ 'pycryptodomex>=3.3', - 'requests>=2.4', - 'httpx>=0.18', - 'cbor2', - 'aiohttp' + 'httpx>=0.28', + 'cbor2>=5.6' ], zip_safe=False, ) diff --git a/tests/helper.py b/tests/helper.py index 2a55782b..24da50ac 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -196,8 +196,8 @@ def pnconf_pam_copy(): return deepcopy(pnconf_pam) -def pnconf_pam_stub_copy(): - return deepcopy(pnconf_pam_stub) +def pnconf_pam_stub_copy(**kwargs): + return copy_and_update(pnconf_pam_stub, **kwargs) def pnconf_pam_acceptance_copy(): diff --git a/tests/integrational/asyncio/test_file_upload.py b/tests/integrational/asyncio/test_file_upload.py index 738d1e8c..cd7d8c5c 100644 --- a/tests/integrational/asyncio/test_file_upload.py +++ b/tests/integrational/asyncio/test_file_upload.py @@ -66,10 +66,10 @@ async def test_list_files(): await pubnub.stop() -@pn_vcr.use_cassette( - "tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json", serializer="pn_json", - filter_query_parameters=['uuid', 'l_file', 'pnsdk'] -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json", serializer="pn_json", +# filter_query_parameters=['uuid', 'l_file', 'pnsdk'] +# ) @pytest.mark.asyncio(loop_scope="module") async def test_send_and_download_file(file_for_upload): pubnub = PubNubAsyncio(pnconf_env_copy()) @@ -83,11 +83,12 @@ async def test_send_and_download_file(file_for_upload): await pubnub.stop() -@pn_vcr.use_cassette( - "tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json", - filter_query_parameters=['uuid', 'l_file', 'pnsdk'], serializer='pn_json' -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json", +# filter_query_parameters=['uuid', 'l_file', 'pnsdk'], serializer='pn_json' +# ) @pytest.mark.asyncio(loop_scope="module") +@pytest.mark.filterwarnings("ignore:.*Usage of local cipher_keys is discouraged.*:DeprecationWarning") async def test_send_and_download_file_encrypted_cipher_key(file_for_upload, file_upload_test_data): pubnub = PubNubAsyncio(pnconf_enc_env_copy()) @@ -105,10 +106,10 @@ async def test_send_and_download_file_encrypted_cipher_key(file_for_upload, file await pubnub.stop() -@pn_vcr.use_cassette( - "tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json", - filter_query_parameters=['uuid', 'l_file', 'pnsdk'], serializer='pn_json' -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json", +# filter_query_parameters=['uuid', 'l_file', 'pnsdk'], serializer='pn_json' +# ) @pytest.mark.asyncio(loop_scope="module") async def test_send_and_download_encrypted_file_crypto_module(file_for_upload, file_upload_test_data): pubnub = PubNubAsyncio(pnconf_enc_env_copy()) diff --git a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json index 0d103f6a..e19d3f17 100644 --- a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json +++ b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_cipher_key.json @@ -7,98 +7,26 @@ "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/generate-upload-url", "body": "{\"name\": \"king_arthur.txt\"}", "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.4.2" + "host": [ + "ps.pndsn.com" ], - "Content-type": [ - "application/json" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Date": [ - "Wed, 27 Mar 2024 14:15:16 GMT" + "accept": [ + "*/*" ], - "Content-Type": [ - "application/json" + "accept-encoding": [ + "gzip, deflate" ], - "Content-Length": [ - "1989" - ], - "Connection": [ + "connection": [ "keep-alive" ], - "Access-Control-Allow-Origin": [ - "*" - ] - }, - "body": { - "string": "{\"status\":200,\"data\":{\"id\":\"4cee979e-98a6-4019-83f9-a8506e7333e9\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-03-27T14:16:16Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/4cee979e-98a6-4019-83f9-a8506e7333e9/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20240327/eu-central-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20240327T141616Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMDMtMjdUMTQ6MTY6MTZaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtODhiOWRiYWItMjBmMS00OGQ0LThkZjMtOWJmYWJiMDBjMGI0LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvNGNlZTk3OWUtOThhNi00MDE5LTgzZjktYTg1MDZlNzMzM2U5L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQwMzI3L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDAzMjdUMTQxNjE2WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"2b4c77b2bfdd08bf83b5bb642d4b0062da19f04e09fb7b5c1b856c2d8d16d956\"}]}}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/", - "body": { - "pickle": "gASVQBIAAAAAAACMEGFpb2h0dHAuZm9ybWRhdGGUjAhGb3JtRGF0YZSTlCmBlH2UKIwHX3dyaXRlcpSMEWFpb2h0dHAubXVsdGlwYXJ0lIwPTXVsdGlwYXJ0V3JpdGVylJOUKYGUfZQojAlfYm91bmRhcnmUQyA3MjYyYWJjMzY3ZmM0ZGYzOTk0MGQ3ZmI5N2M4ZjBmZZSMCV9lbmNvZGluZ5ROjAlfZmlsZW5hbWWUTowIX2hlYWRlcnOUjBRtdWx0aWRpY3QuX211bHRpZGljdJSMC0NJTXVsdGlEaWN0l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mtaVzUwYVdGc0lqb2dJa0ZMU1VGWk4wRlZOa2RSUkZZMVRFTlFWa1ZZTHpJd01qUXdNekkzTDJWMUxXTmxiblJ5WVd3dE1TOXpNeTloZDNNMFgzSmxjWFZsYzNRaWZTd0tDUWw3SW5ndFlXMTZMWE5sWTNWeWFYUjVMWFJ2YTJWdUlqb2dJaUo5TEFvSkNYc2llQzFoYlhvdFlXeG5iM0pwZEdodElqb2dJa0ZYVXpRdFNFMUJReTFUU0VFeU5UWWlmU3dLQ1FsN0luZ3RZVzE2TFdSaGRHVWlPaUFpTWpBeU5EQXpNamRVTVRReE5qRTJXaUlnZlFvSlhRcDlDZz09lIeUaKtdlGitjA9YLUFtei1TaWduYXR1cmWUhpRhhZRSlH2UaBhoJ3OMQDJiNGM3N2IyYmZkZDA4YmY4M2I1YmI2NDJkNGIwMDYyZGExOWYwNGUwOWZiN2I1YzFiODU2YzJkOGQxNmQ5NTaUh5Roq12UKGitjARmaWxllIaUjAhmaWxlbmFtZZSMD2tpbmdfYXJ0aHVyLnR4dJSGlGWFlFKUfZRoGGiec2imh5RljA1faXNfbXVsdGlwYXJ0lIiMDV9pc19wcm9jZXNzZWSUiIwNX3F1b3RlX2ZpZWxkc5SIjAhfY2hhcnNldJROdWIu" - }, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.4.2" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "x-amz-id-2": [ - "sLfBX7SyW1G9k55Z0mYBFPxhudkF9Qz9/y4XDxSMpLIMyJXRYRp3S3XveE9no3xX3T+Hi45AXh25iocM3rWjUQ==" - ], - "x-amz-request-id": [ - "W4CR5WKB0MKJ20FJ" - ], - "Date": [ - "Wed, 27 Mar 2024 14:15:17 GMT" - ], - "x-amz-expiration": [ - "expiry-date=\"Fri, 29 Mar 2024 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "Etag": [ - "\"54c0565f0dd787c6d22c3d455b12d6ac\"" + "user-agent": [ + "PubNub-Python-Asyncio/9.1.0" ], - "Location": [ - "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/{PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2F4cee979e-98a6-4019-83f9-a8506e7333e9%2Fking_arthur.txt" + "content-type": [ + "application/json" ], - "Server": [ - "AmazonS3" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_asyncio_ch/0/%22a25pZ2h0c29mbmkxMjM0NXmhf%2BORk1GxlwqjcrSxSR7QjuwQHs4oHPiUsXidPQkk1vPPyxRJDAK7XvCHEfoIK%2FRZQp7A%2BLcccQ7uFhyz1B%2BH07cIalE%2F6KNNxUx40Y0a57VZsd6%2BAXuhmCuggimMsgCIxXIR5RWpZBBETdr8VBBDrQz0gGmCFgPp6%2Fji%2BQLO%22?meta=null&store=1&ttl=222", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.4.2" + "content-length": [ + "27" ] } }, @@ -109,135 +37,88 @@ }, "headers": { "Date": [ - "Wed, 27 Mar 2024 14:15:16 GMT" + "Mon, 09 Dec 2024 15:38:05 GMT" ], "Content-Type": [ - "text/javascript; charset=\"UTF-8\"" + "application/json" ], "Content-Length": [ - "30" + "1982" ], "Connection": [ "keep-alive" ], - "Cache-Control": [ - "no-cache" + "Access-Control-Allow-Credentials": [ + "true" ], - "Access-Control-Allow-Origin": [ + "Access-Control-Expose-Headers": [ "*" - ], - "Access-Control-Allow-Methods": [ - "GET" ] }, "body": { - "string": "[1,\"Sent\",\"17115489163320100\"]" + "string": "{\"status\":200,\"data\":{\"id\":\"c7e30d08-b0af-4923-99b4-c2be5f931ff2\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-09T15:39:05Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/c7e30d08-b0af-4923-99b4-c2be5f931ff2/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241209/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241209T153905Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDlUMTU6Mzk6MDVaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvYzdlMzBkMDgtYjBhZi00OTIzLTk5YjQtYzJiZTVmOTMxZmYyL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA5L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDlUMTUzOTA1WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"df74a5c203a340d443760e4ee28f0b6d7abb01e20cc73ee611b33d92251cb049\"}]}}" } } }, { "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/files/4cee979e-98a6-4019-83f9-a8506e7333e9/king_arthur.txt", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.4.2" - ] - } - }, - "response": { - "status": { - "code": 307, - "message": "Temporary Redirect" - }, + "method": "POST", + "uri": "https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/", + "body": "tagging=&tagging=%3CTagging%3E%3CTagSet%3E%3CTag%3E%3CKey%3EObjectTTLInDays%3C%2FKey%3E%3CValue%3E1%3C%2FValue%3E%3C%2FTag%3E%3C%2FTagSet%3E%3C%2FTagging%3E&key=&key={PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2Fc7e30d08-b0af-4923-99b4-c2be5f931ff2%2Fking_arthur.txt&Content-Type=&Content-Type=text%2Fplain%3B+charset%3Dutf-8&X-Amz-Credential=&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Security-Token=&X-Amz-Security-Token=&X-Amz-Algorithm=&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=&X-Amz-Date=20241209T153905Z&Policy=&Policy=CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDlUMTU6Mzk6MDVaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc%2BPFRhZ1NldD48VGFnPjxLZXk%2BT2JqZWN0VFRMSW5EYXlzPC9LZXk%2BPFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvYzdlMzBkMDgtYjBhZi00OTIzLTk5YjQtYzJiZTVmOTMxZmYyL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA5L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDlUMTUzOTA1WiIgfQoJXQp9Cg%3D%3D&X-Amz-Signature=&X-Amz-Signature=df74a5c203a340d443760e4ee28f0b6d7abb01e20cc73ee611b33d92251cb049&file=king_arthur.txt&file=b%27knightsofni12345%5Cxb5%5Cxe2%5Cxde%5Cx10%5Cn%5Cxce%5Cx96t%7D%5Cx12%5Cx16j%5Cxbb%60k%5Cxac%5Cx81%5Cxce%5Cx8a%5Cxed%5Cxea%5Cxb8%5Cxf5%5Cxd7%5Cx13V%5Cxceg%40%5Cx14h%5Cx7f%27&file=", "headers": { - "Date": [ - "Wed, 27 Mar 2024 14:15:16 GMT" + "host": [ + "pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com" ], - "Content-Length": [ - "0" + "accept": [ + "*/*" ], - "Connection": [ + "accept-encoding": [ + "gzip, deflate" + ], + "connection": [ "keep-alive" ], - "Access-Control-Allow-Origin": [ - "*" + "user-agent": [ + "PubNub-Python-Asyncio/9.1.0" ], - "Cache-Control": [ - "public, max-age=2924, immutable" + "content-length": [ + "1830" ], - "Location": [ - "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/4cee979e-98a6-4019-83f9-a8506e7333e9/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20240327%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T140000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=337cf3bf979ff66c54a9b499ca706ae0b63d0c78518889d304efcc9e25a7c9c1" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/4cee979e-98a6-4019-83f9-a8506e7333e9/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20240327%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20240327T140000Z&X-Amz-Expires=3900&X-Amz-Signature=337cf3bf979ff66c54a9b499ca706ae0b63d0c78518889d304efcc9e25a7c9c1&X-Amz-SignedHeaders=host", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.4.2" + "content-type": [ + "application/x-www-form-urlencoded" ] } }, "response": { "status": { - "code": 200, - "message": "OK" + "code": 400, + "message": "Bad Request" }, "headers": { - "Content-Type": [ - "text/plain; charset=utf-8" - ], - "Content-Length": [ - "48" - ], - "Connection": [ - "keep-alive" - ], - "Date": [ - "Wed, 27 Mar 2024 14:15:17 GMT" + "x-amz-request-id": [ + "BP3X0AAZD6WF2T57" ], - "Last-Modified": [ - "Wed, 27 Mar 2024 14:15:17 GMT" + "x-amz-id-2": [ + "KoIsidWfwva/XBOvHo6JGnQ9ceUd+mHB4BQxzEG2duZkLcnxTmYdDW1fAkkr6H5VXFd/rG/S0Pg=" ], - "x-amz-expiration": [ - "expiry-date=\"Fri, 29 Mar 2024 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" + "Content-Type": [ + "application/xml" ], - "Etag": [ - "\"54c0565f0dd787c6d22c3d455b12d6ac\"" + "Transfer-Encoding": [ + "chunked" ], - "x-amz-server-side-encryption": [ - "AES256" + "Date": [ + "Mon, 09 Dec 2024 15:38:05 GMT" ], - "Accept-Ranges": [ - "bytes" + "Connection": [ + "close" ], "Server": [ "AmazonS3" - ], - "X-Cache": [ - "Miss from cloudfront" - ], - "Via": [ - "1.1 51ef96adddea56ccd77a68113e740792.cloudfront.net (CloudFront)" - ], - "X-Amz-Cf-Pop": [ - "HAM50-P3" - ], - "X-Amz-Cf-Id": [ - "k-y4MUu4bX9-Ii1rYUfV7gMhU-NvxnR-4bLhA70SWiNeEAIAh_lb6g==" ] }, "body": { - "binary": "a25pZ2h0c29mbmkxMjM0NbXi3hAKzpZ0fRIWartga6yBzort6rj11xNWzmdAFGh/" + "string": "\nAuthorizationQueryParametersErrorX-Amz-Algorithm only supports \"AWS4-HMAC-SHA256 and AWS4-ECDSA-P256-SHA256\"BP3X0AAZD6WF2T57KoIsidWfwva/XBOvHo6JGnQ9ceUd+mHB4BQxzEG2duZkLcnxTmYdDW1fAkkr6H5VXFd/rG/S0Pg=" } } } diff --git a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json index eab19a6f..7c751f43 100644 --- a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json +++ b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_encrypted_file_crypto_module.json @@ -7,98 +7,26 @@ "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/generate-upload-url", "body": "{\"name\": \"king_arthur.txt\"}", "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.2.0" + "host": [ + "ps.pndsn.com" ], - "Content-type": [ - "application/json" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Date": [ - "Wed, 04 Oct 2023 21:18:29 GMT" + "accept": [ + "*/*" ], - "Content-Type": [ - "application/json" + "accept-encoding": [ + "gzip, deflate" ], - "Content-Length": [ - "1989" - ], - "Connection": [ + "connection": [ "keep-alive" ], - "Access-Control-Allow-Origin": [ - "*" - ] - }, - "body": { - "string": "{\"status\":200,\"data\":{\"id\":\"b22c070e-905a-4991-9fed-adac8fa8af16\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2023-10-04T21:19:29Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/b22c070e-905a-4991-9fed-adac8fa8af16/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20231004/eu-central-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20231004T211929Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjMtMTAtMDRUMjE6MTk6MjlaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtODhiOWRiYWItMjBmMS00OGQ0LThkZjMtOWJmYWJiMDBjMGI0LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvYjIyYzA3MGUtOTA1YS00OTkxLTlmZWQtYWRhYzhmYThhZjE2L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjMxMDA0L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMzEwMDRUMjExOTI5WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"5099f1cca2ca8fea8fe4e2a52b14c222aab151465170a83ec606651750e2824e\"}]}}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/", - "body": { - "pickle": "gASVQBIAAAAAAACMEGFpb2h0dHAuZm9ybWRhdGGUjAhGb3JtRGF0YZSTlCmBlH2UKIwHX3dyaXRlcpSMEWFpb2h0dHAubXVsdGlwYXJ0lIwPTXVsdGlwYXJ0V3JpdGVylJOUKYGUfZQojAlfYm91bmRhcnmUQyA1N2M5N2MzYmY1Nzk0NGVkODlmMzAyNzlkYjM2MjRlNJSMCV9lbmNvZGluZ5ROjAlfZmlsZW5hbWWUTowIX2hlYWRlcnOUjBRtdWx0aWRpY3QuX211bHRpZGljdJSMC0NJTXVsdGlEaWN0lJOUXZRoEIwEaXN0cpSTlIwMQ29udGVudC1UeXBllIWUgZSMPm11bHRpcGFydC9mb3JtLWRhdGE7IGJvdW5kYXJ5PTU3Yzk3YzNiZjU3OTQ0ZWQ4OWYzMDI3OWRiMzYyNGU0lIaUYYWUUpSMBl92YWx1ZZROjAZfcGFydHOUXZQojA9haW9odHRwLnBheWxvYWSUjA1TdHJpbmdQYXlsb2FklJOUKYGUfZQo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vdFlXeG5iM0pwZEdodElqb2dJa0ZYVXpRdFNFMUJReTFUU0VFeU5UWWlmU3dLQ1FsN0luZ3RZVzE2TFdSaGRHVWlPaUFpTWpBeU16RXdNRFJVTWpFeE9USTVXaUlnZlFvSlhRcDlDZz09lIeUaKtdlGitjA9YLUFtei1TaWduYXR1cmWUhpRhhZRSlH2UaBhoJ3OMQDUwOTlmMWNjYTJjYThmZWE4ZmU0ZTJhNTJiMTRjMjIyYWFiMTUxNDY1MTcwYTgzZWM2MDY2NTE3NTBlMjgyNGWUh5Roq12UKGitjARmaWxllIaUjAhmaWxlbmFtZZSMD2tpbmdfYXJ0aHVyLnR4dJSGlGWFlFKUfZRoGGiec2imh5RljA1faXNfbXVsdGlwYXJ0lIiMDV9pc19wcm9jZXNzZWSUiIwNX3F1b3RlX2ZpZWxkc5SIjAhfY2hhcnNldJROdWIu" - }, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.2.0" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "x-amz-id-2": [ - "V2r626odxjnMqEQmtN3oehjg6sglTjhLO1pieDbc8V8EnKYbMiqPANmfJ26Vp6jDEDbSagrSASc=" - ], - "x-amz-request-id": [ - "SV4ABQRDEFARYBAS" - ], - "Date": [ - "Wed, 04 Oct 2023 21:18:30 GMT" - ], - "x-amz-expiration": [ - "expiry-date=\"Fri, 06 Oct 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "Etag": [ - "\"362a42f11bfefffa798da06de4b19c69\"" + "user-agent": [ + "PubNub-Python-Asyncio/9.1.0" ], - "Location": [ - "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/{PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2Fb22c070e-905a-4991-9fed-adac8fa8af16%2Fking_arthur.txt" + "content-type": [ + "application/json" ], - "Server": [ - "AmazonS3" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_asyncio_ch/0/%22a25pZ2h0c29mbmkxMjM0NRV4jkZbYJKJpBh%2Ffy8gkkKwgHzJoLg%2FKPi4WjFBAQgYCqObP0j7BPevaNiSqFIQ%2FxkMxOZqOrIpql4hH9b%2B2pRRdQ0X8NGVLSR%2B7UtVZsZ1KGdglj05%2BEckPBWJ%2BiVsJVsWEtc2%2BkP1c6j5CuoHz3XD9cFfQ4RyNNudWGa1quE2%22?meta=null&store=1&ttl=222", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.2.0" + "content-length": [ + "27" ] } }, @@ -109,135 +37,88 @@ }, "headers": { "Date": [ - "Wed, 04 Oct 2023 21:18:29 GMT" + "Mon, 09 Dec 2024 15:38:06 GMT" ], "Content-Type": [ - "text/javascript; charset=\"UTF-8\"" + "application/json" ], "Content-Length": [ - "30" + "1982" ], "Connection": [ "keep-alive" ], - "Cache-Control": [ - "no-cache" + "Access-Control-Allow-Credentials": [ + "true" ], - "Access-Control-Allow-Origin": [ + "Access-Control-Expose-Headers": [ "*" - ], - "Access-Control-Allow-Methods": [ - "GET" ] }, "body": { - "string": "[1,\"Sent\",\"16964543094635156\"]" + "string": "{\"status\":200,\"data\":{\"id\":\"10964cc6-bb29-4d16-a99d-807d47790cb3\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-09T15:39:06Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/10964cc6-bb29-4d16-a99d-807d47790cb3/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241209/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241209T153906Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDlUMTU6Mzk6MDZaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvMTA5NjRjYzYtYmIyOS00ZDE2LWE5OWQtODA3ZDQ3NzkwY2IzL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA5L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDlUMTUzOTA2WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"4e960086760d62dd32605d17ff958a7eb858f034f8d23cd7f612ab241782128d\"}]}}" } } }, { "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/files/b22c070e-905a-4991-9fed-adac8fa8af16/king_arthur.txt", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.2.0" - ] - } - }, - "response": { - "status": { - "code": 307, - "message": "Temporary Redirect" - }, + "method": "POST", + "uri": "https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/", + "body": "tagging=&tagging=%3CTagging%3E%3CTagSet%3E%3CTag%3E%3CKey%3EObjectTTLInDays%3C%2FKey%3E%3CValue%3E1%3C%2FValue%3E%3C%2FTag%3E%3C%2FTagSet%3E%3C%2FTagging%3E&key=&key={PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2F10964cc6-bb29-4d16-a99d-807d47790cb3%2Fking_arthur.txt&Content-Type=&Content-Type=text%2Fplain%3B+charset%3Dutf-8&X-Amz-Credential=&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Security-Token=&X-Amz-Security-Token=&X-Amz-Algorithm=&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=&X-Amz-Date=20241209T153906Z&Policy=&Policy=CnsKCSJleHBpc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F%5Cxd0%5Cx05g%5Cx87%5Cxc5%5Cxad%5Cx93%5Cx92%5Cxab%5D%5Cx8e%24%5Cxfd%5Cx87%23%5Cxfc%5Cxd1%5Cx02%26%27&file=", "headers": { - "Date": [ - "Wed, 04 Oct 2023 21:18:29 GMT" + "host": [ + "pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com" ], - "Content-Length": [ - "0" + "accept": [ + "*/*" ], - "Connection": [ + "accept-encoding": [ + "gzip, deflate" + ], + "connection": [ "keep-alive" ], - "Access-Control-Allow-Origin": [ - "*" + "user-agent": [ + "PubNub-Python-Asyncio/9.1.0" ], - "Cache-Control": [ - "public, max-age=2731, immutable" + "content-length": [ + "1841" ], - "Location": [ - "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/b22c070e-905a-4991-9fed-adac8fa8af16/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20231004%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231004T210000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=1c98bdcaaa8e8b4a46527a6dd9d93e07a40750e75f3c9d65a46070c35488b97d" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/b22c070e-905a-4991-9fed-adac8fa8af16/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20231004%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20231004T210000Z&X-Amz-Expires=3900&X-Amz-Signature=1c98bdcaaa8e8b4a46527a6dd9d93e07a40750e75f3c9d65a46070c35488b97d&X-Amz-SignedHeaders=host", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/7.2.0" + "content-type": [ + "application/x-www-form-urlencoded" ] } }, "response": { "status": { - "code": 200, - "message": "OK" + "code": 400, + "message": "Bad Request" }, "headers": { - "Content-Type": [ - "text/plain; charset=utf-8" - ], - "Content-Length": [ - "48" - ], - "Connection": [ - "keep-alive" - ], - "Date": [ - "Wed, 04 Oct 2023 21:18:30 GMT" + "x-amz-request-id": [ + "45FBTK5ZK0HWSPE3" ], - "Last-Modified": [ - "Wed, 04 Oct 2023 21:18:30 GMT" + "x-amz-id-2": [ + "FpJ4LZGyVNHgWbR70beRKQ+j7tqUgucrZbbjzVLNg0tEvotzM5R4hfLZ/TIl3Lv/Eb4AG6RbVLU=" ], - "x-amz-expiration": [ - "expiry-date=\"Fri, 06 Oct 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" + "Content-Type": [ + "application/xml" ], - "Etag": [ - "\"362a42f11bfefffa798da06de4b19c69\"" + "Transfer-Encoding": [ + "chunked" ], - "x-amz-server-side-encryption": [ - "AES256" + "Date": [ + "Mon, 09 Dec 2024 15:38:05 GMT" ], - "Accept-Ranges": [ - "bytes" + "Connection": [ + "close" ], "Server": [ "AmazonS3" - ], - "X-Cache": [ - "Miss from cloudfront" - ], - "Via": [ - "1.1 418adba378bf9a2158988959402e17a6.cloudfront.net (CloudFront)" - ], - "X-Amz-Cf-Pop": [ - "WAW51-P3" - ], - "X-Amz-Cf-Id": [ - "Ih3dVdK-NGOjK8nPNKg7GDN5Ifsd2e7ZgNiQ7A28YvDG0cclAlOM7g==" ] }, "body": { - "binary": "NjEyNDY0MzY0MzA0Mjk1NGaRM9sYxcHerM2AML91WtL/6siVzzQuU0c4VZpXFS24" + "string": "\nAuthorizationQueryParametersErrorX-Amz-Algorithm only supports \"AWS4-HMAC-SHA256 and AWS4-ECDSA-P256-SHA256\"45FBTK5ZK0HWSPE3FpJ4LZGyVNHgWbR70beRKQ+j7tqUgucrZbbjzVLNg0tEvotzM5R4hfLZ/TIl3Lv/Eb4AG6RbVLU=" } } } diff --git a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json index 6fa6063f..0d5d7606 100644 --- a/tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json +++ b/tests/integrational/fixtures/asyncio/file_upload/send_and_download_file.json @@ -7,11 +7,26 @@ "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/generate-upload-url", "body": "{\"name\": \"king_arthur.txt\"}", "headers": { - "User-Agent": [ + "host": [ + "ps.pndsn.com" + ], + "accept": [ + "*/*" + ], + "accept-encoding": [ + "gzip, deflate" + ], + "connection": [ + "keep-alive" + ], + "user-agent": [ "PubNub-Python-Asyncio/9.1.0" ], - "Content-type": [ + "content-type": [ "application/json" + ], + "content-length": [ + "27" ] } }, @@ -22,7 +37,7 @@ }, "headers": { "Date": [ - "Tue, 03 Dec 2024 14:48:28 GMT" + "Mon, 09 Dec 2024 15:38:04 GMT" ], "Content-Type": [ "application/json" @@ -41,7 +56,7 @@ ] }, "body": { - "string": "{\"status\":200,\"data\":{\"id\":\"55efe26a-3aa3-4f15-bb49-394630953b75\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-03T14:49:28Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/55efe26a-3aa3-4f15-bb49-394630953b75/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241203/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241203T144928Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDNUMTQ6NDk6MjhaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvNTVlZmUyNmEtM2FhMy00ZjE1LWJiNDktMzk0NjMwOTUzYjc1L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjAzL3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDNUMTQ0OTI4WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"d096204393f950ef72f2ac8f2716c6bc21520511b15b34335be5be6c363fcf9a\"}]}}" + "string": "{\"status\":200,\"data\":{\"id\":\"740ff3c3-6e0e-4849-801b-995dec393bca\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-09T15:39:04Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/740ff3c3-6e0e-4849-801b-995dec393bca/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241209/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241209T153904Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDlUMTU6Mzk6MDRaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvNzQwZmYzYzMtNmUwZS00ODQ5LTgwMWItOTk1ZGVjMzkzYmNhL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA5L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDlUMTUzOTA0WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"ebb872e578135630979d016807f021e3f954a7ae97f8e8a98a513262991f7902\"}]}}" } } }, @@ -49,204 +64,61 @@ "request": { "method": "POST", "uri": "https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/", - "body": { - "pickle": "gASVmhEAAAAAAACMEGFpb2h0dHAuZm9ybWRhdGGUjAhGb3JtRGF0YZSTlCmBlH2UKIwHX3dyaXRlcpSMEWFpb2h0dHAubXVsdGlwYXJ0lIwPTXVsdGlwYXJ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GWk4wRlZOa2RSUkZZMVRFTlFWa1ZZTHpJd01qUXhNakF6TDNWekxXVmhjM1F0TVM5ek15OWhkM00wWDNKbGNYVmxjM1FpZlN3S0NRbDdJbmd0WVcxNkxYTmxZM1Z5YVhSNUxYUnZhMlZ1SWpvZ0lpSjlMQW9KQ1hzaWVDMWhiWG90WVd4bmIzSnBkR2h0SWpvZ0lrRlhVelF0U0UxQlF5MVRTRUV5TlRZaWZTd0tDUWw3SW5ndFlXMTZMV1JoZEdVaU9pQWlNakF5TkRFeU1ETlVNVFEwT1RJNFdpSWdmUW9KWFFwOUNnPT2Uh5RolF2UaJaMD1gtQW16LVNpZ25hdHVyZZSGlGGFlFKUfZRoGGgnc4xAZDA5NjIwNDM5M2Y5NTBlZjcyZjJhYzhmMjcxNmM2YmMyMTUyMDUxMWIxNWIzNDMzNWJlNWJlNmMzNjNmY2Y5YZSHlGiUXZQoaJaMBGZpbGWUhpSMCGZpbGVuYW1llIwPa2luZ19hcnRodXIudHh0lIaUZYWUUpR9lGgYaIhzaI6HlGWMDV9pc19tdWx0aXBhcnSUiIwNX2lzX3Byb2Nlc3NlZJSIjA1fcXVvdGVfZmllbGRzlIiMCF9jaGFyc2V0lE51Yi4=" - }, + "body": "tagging=&tagging=%3CTagging%3E%3CTagSet%3E%3CTag%3E%3CKey%3EObjectTTLInDays%3C%2FKey%3E%3CValue%3E1%3C%2FValue%3E%3C%2FTag%3E%3C%2FTagSet%3E%3C%2FTagging%3E&key=&key={PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2F740ff3c3-6e0e-4849-801b-995dec393bca%2Fking_arthur.txt&Content-Type=&Content-Type=text%2Fplain%3B+charset%3Dutf-8&X-Amz-Credential=&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20241209%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Security-Token=&X-Amz-Security-Token=&X-Amz-Algorithm=&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=&X-Amz-Date=20241209T153904Z&Policy=&Policy=CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDlUMTU6Mzk6MDRaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc%2BPFRhZ1NldD48VGFnPjxLZXk%2BT2JqZWN0VFRMSW5EYXlzPC9LZXk%2BPFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1LzBNUjEtejJ3MG5TSll4d0V5NzRwNVFqVjg1VG1nTkJLUHJWNzF0NTVOVDAvNzQwZmYzYzMtNmUwZS00ODQ5LTgwMWItOTk1ZGVjMzkzYmNhL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA5L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDlUMTUzOTA0WiIgfQoJXQp9Cg%3D%3D&X-Amz-Signature=&X-Amz-Signature=ebb872e578135630979d016807f021e3f954a7ae97f8e8a98a513262991f7902&file=king_arthur.txt&file=b%27Knights+who+say+Ni%21%27&file=", "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/9.1.0" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "x-amz-id-2": [ - "fzh7ifvK42Ie7Qv8f2cChOodj0p9454TXkCUKcuIxZiBXALvvy0neLniX47eNJUyLRTzJp0asr8=" - ], - "x-amz-request-id": [ - "4EJZKE3DYEB9HPDZ" - ], - "Date": [ - "Tue, 03 Dec 2024 14:48:29 GMT" - ], - "x-amz-expiration": [ - "expiry-date=\"Thu, 05 Dec 2024 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" + "host": [ + "pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com" ], - "x-amz-server-side-encryption": [ - "AES256" + "accept": [ + "*/*" ], - "Etag": [ - "\"3676cdb7a927db43c846070c4e7606c7\"" + "accept-encoding": [ + "gzip, deflate" ], - "Location": [ - "https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/{PN_KEY_SUBSCRIBE}%2F0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0%2F55efe26a-3aa3-4f15-bb49-394630953b75%2Fking_arthur.txt" - ], - "Server": [ - "AmazonS3" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_asyncio_ch/0/%7B%22message%22%3A%20%7B%22test_message%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%2255efe26a-3aa3-4f15-bb49-394630953b75%22%2C%20%22name%22%3A%20%22king_arthur.txt%22%7D%7D?meta=null&store=1&ttl=222", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/9.1.0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Date": [ - "Tue, 03 Dec 2024 14:48:28 GMT" - ], - "Content-Type": [ - "text/javascript; charset=\"UTF-8\"" - ], - "Content-Length": [ - "30" - ], - "Connection": [ + "connection": [ "keep-alive" ], - "Cache-Control": [ - "no-cache" + "user-agent": [ + "PubNub-Python-Asyncio/9.1.0" ], - "Access-Control-Allow-Methods": [ - "GET" + "content-length": [ + "1684" ], - "Access-Control-Allow-Credentials": [ - "true" - ], - "Access-Control-Expose-Headers": [ - "*" - ] - }, - "body": { - "string": "[1,\"Sent\",\"17332373086977226\"]" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_asyncio_ch/files/55efe26a-3aa3-4f15-bb49-394630953b75/king_arthur.txt", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/9.1.0" + "content-type": [ + "application/x-www-form-urlencoded" ] } }, "response": { "status": { - "code": 307, - "message": "Temporary Redirect" + "code": 400, + "message": "Bad Request" }, "headers": { - "Date": [ - "Tue, 03 Dec 2024 14:48:28 GMT" - ], - "Content-Length": [ - "0" - ], - "Connection": [ - "keep-alive" - ], - "Cache-Control": [ - "public, max-age=932, immutable" - ], - "Location": [ - "https://files-us-east-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/55efe26a-3aa3-4f15-bb49-394630953b75/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20241203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241203T140000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=464ddee6259c7537247771648bfe53921327d9030b0fc70fc013d8967bedf4bd" + "x-amz-request-id": [ + "BP3G8C294E7HAKNJ" ], - "Access-Control-Allow-Credentials": [ - "true" + "x-amz-id-2": [ + "zMeim2dB+COXRwPdjzh3SS6Y3cfSyojyXb7z67As/oXDVVDxWTIABZCeEXnSOV5ws+10nRrYiJA=" ], - "Access-Control-Expose-Headers": [ - "*" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://files-us-east-1.pndsn.com/{PN_KEY_SUBSCRIBE}/0MR1-z2w0nSJYxwEy74p5QjV85TmgNBKPrV71t55NT0/55efe26a-3aa3-4f15-bb49-394630953b75/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20241203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241203T140000Z&X-Amz-Expires=3900&X-Amz-Signature=464ddee6259c7537247771648bfe53921327d9030b0fc70fc013d8967bedf4bd&X-Amz-SignedHeaders=host", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python-Asyncio/9.1.0" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { "Content-Type": [ - "text/plain; charset=utf-8" + "application/xml" ], - "Content-Length": [ - "19" - ], - "Connection": [ - "keep-alive" + "Transfer-Encoding": [ + "chunked" ], "Date": [ - "Tue, 03 Dec 2024 14:48:30 GMT" - ], - "Last-Modified": [ - "Tue, 03 Dec 2024 14:48:29 GMT" - ], - "x-amz-expiration": [ - "expiry-date=\"Thu, 05 Dec 2024 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" + "Mon, 09 Dec 2024 15:38:04 GMT" ], - "Etag": [ - "\"3676cdb7a927db43c846070c4e7606c7\"" - ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "Accept-Ranges": [ - "bytes" + "Connection": [ + "close" ], "Server": [ "AmazonS3" - ], - "X-Cache": [ - "Miss from cloudfront" - ], - "Via": [ - "1.1 376388af58845ad0897ba599cce4d92e.cloudfront.net (CloudFront)" - ], - "X-Amz-Cf-Pop": [ - "HAM50-C1" - ], - "X-Amz-Cf-Id": [ - "N1qaPHKyjBiA8tY5y7c5pJwplvxUQG2mvHPB0TT9Br1YyMP_rCCzLg==" ] }, "body": { - "string": "Knights who say Ni!" + "string": "\nAuthorizationQueryParametersErrorX-Amz-Algorithm only supports \"AWS4-HMAC-SHA256 and AWS4-ECDSA-P256-SHA256\"BP3G8C294E7HAKNJzMeim2dB+COXRwPdjzh3SS6Y3cfSyojyXb7z67As/oXDVVDxWTIABZCeEXnSOV5ws+10nRrYiJA=" } } } diff --git a/tests/integrational/fixtures/native_sync/file_upload/delete_file.yaml b/tests/integrational/fixtures/native_sync/file_upload/delete_file.yaml deleted file mode 100644 index 60b54119..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/delete_file.yaml +++ /dev/null @@ -1,182 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xV2XajOBD9lTl+7SZGbIbM6QcHLzEBYgwWy8ycHAFiM4vbiNi4T//7CDtJezov - 8wCoSrdKt0pX4seoJYh07eieY9mvoxgRNLr/Mcrj0f0oVGIlnEgThuViiREENGEQAhEjRtKEBUiJ - cCiPvo5qVGGK3uV1+oIOJOsOd+RERj+/jpK8xC/dvmxQ/HLA3zvckiF5dygpPiNk396Px/surLuQ - qWpcNW1fY2aIahncMRGuyQGVDGD2h/iu5e9Qhc5NjY7tXdRUY7p0hUnWDFTXz7ZDbXza5wdE8qZ+ - oZUMrDiWYxkAGKA4HHvPgntBDigwaQ7VS5LjMqaV//VjtMM9BROUprQKOv+Kym4I/7tjWT5yrv6L - gT9cNia/eW7NJ9xfzeewwBFxHH1Vz1DfXmfHH9NXGw7rXR3gDXHjevP8tsL4M4fxf5jSLXivbHj/ - qqql/Y6YSJY5gUsQA3iEaY9wyIQRL9C2S0msSBOUKOI4YchqGpme9qxUMkhcCF8aJrEt5hV3e/Pg - lA2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SLzgiKyEhJBKPOKzImiRK/1f37+/BcAAP//AwAzID7/uAcAAA== - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 19 Nov 2020 20:00:48 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: "--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - tagging\"\r\n\r\nObjectTTLInDays1\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - key\"\r\n\r\nsub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/b9d9b767-02d6-44a7-aa1c-5c6701a9ceb8/king_arthur.txt\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - Content-Type\"\r\n\r\ntext/plain; charset=utf-8\r\n--c8b75015006dd33852fc387a65435719\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Credential\"\r\n\r\nAKIAY7AU6GQD5KWBS3FG/20201119/eu-central-1/s3/aws4_request\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Security-Token\"\r\n\r\n\r\n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition:\ - \ form-data; name=\"X-Amz-Algorithm\"\r\n\r\nAWS4-HMAC-SHA256\r\n--c8b75015006dd33852fc387a65435719\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Date\"\r\n\r\n20201119T200148Z\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - Policy\"\r\n\r\nCnsKCSJleHBpcmF0aW9uIjogIjIwMjAtMTEtMTlUMjA6MDE6NDhaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtYzg4MjQyZmEtMTNhZS0xMWViLWJjMzQtY2U2ZmQ5NjdhZjk1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvYjlkOWI3NjctMDJkNi00NGE3LWFhMWMtNWM2NzAxYTljZWI4L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRDVLV0JTM0ZHLzIwMjAxMTE5L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMDExMTlUMjAwMTQ4WiIgfQoJXQp9Cg==\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Signature\"\r\n\r\n334315ac3dcce23316ad3f5a07657c436ec4f88198bf8349506a51b83982556e\r\ - \n--c8b75015006dd33852fc387a65435719\r\nContent-Disposition: form-data; name=\"\ - file\"; filename=\"king_arthur.txt\"\r\n\r\nKnights who say Ni!\r\n--c8b75015006dd33852fc387a65435719--\r\ - \n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2314' - Content-Type: - - multipart/form-data; boundary=c8b75015006dd33852fc387a65435719 - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: '' - headers: - Date: - - Thu, 19 Nov 2020 20:00:50 GMT - ETag: - - '"3676cdb7a927db43c846070c4e7606c7"' - Location: - - https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/sub-c-mock-key%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2Fb9d9b767-02d6-44a7-aa1c-5c6701a9ceb8%2Fking_arthur.txt - Server: - - AmazonS3 - x-amz-expiration: - - expiry-date="Sat, 21 Nov 2020 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-id-2: - - taqK+GJWRVIcdyCiat2ttz2p7OArx27pj11rHs72wFIJx8AwFOBHH7p+AwuswS7TdQEaRytSH4U= - x-amz-request-id: - - 0D04E2CE1C7F7FC1 - x-amz-server-side-encryption: - - AES256 - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test_message%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%22b9d9b767-02d6-44a7-aa1c-5c6701a9ceb8%22%2C%20%22name%22%3A%20%22king_arthur.txt%22%7D%7D?meta=null&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16058160503920483"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:00:50 GMT - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - PubNub-Python/4.6.1 - method: DELETE - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files/b9d9b767-02d6-44a7-aa1c-5c6701a9ceb8/king_arthur.txt?uuid=files_native_sync_uuid - response: - body: - string: '{"status":200}' - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Length: - - '14' - Content-Type: - - application/json - Date: - - Thu, 19 Nov 2020 20:00:50 GMT - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/download_file.yaml b/tests/integrational/fixtures/native_sync/file_upload/download_file.yaml deleted file mode 100644 index 801e694d..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/download_file.yaml +++ /dev/null @@ -1,231 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xV23KjOBD9lS2/zhBL3GKyNQ8EXxkgtsHisruVEiAwmIvHiNh4Kv++wk4y3snL - PmDUrdOt091H+OegoZi2zeCBB+DrIMYUDx5+DrJ48DAg0b2E+TjkZCm650QZJ5wS8jInQ0VQkpEy - EqA4+DqocEkYepdV6TM+0G17uKMnOnj9Okiygjy3+6LG8fOB/GhJQ/vk7aFg+C2l++ZhONy3YdWG - XFmRsm66inB9VMORlotIRQ+44CC3P8R3jXCHS3yuK3xs7qK6HLKjS0K3dU91+WQ7zCanfXbANKur - Z1ZJz4oHPOAg5KDi8OABwAegBAyY1IfyOclIEbPK//o52JGOgSlOU1YF23/BRduH/90CIETO1X8x - yIfLJvQ3z635nXRX8ynMSUQdx1hUY9w1193hx/bVRv15Vwd8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b4UxUK+j6ebekbN2/DZmhP4OOqg449mXSW438+w11vY1bzU6ayOagduzun - t3t0NB1VcrNFmqxq3VvtFS399u3zJyNLK/b3eri92IpyLwNJCRUsEZkHoxCLGIQkjkQgynwsJwmM - AZYTCGWeH4EIgnsxkXg+FGXCYxkOXv95ff0XAAD//wMArBAkrbgHAAA= - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 19 Nov 2020 20:00:09 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: "--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - tagging\"\r\n\r\nObjectTTLInDays1\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - key\"\r\n\r\nsub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/ec75a2db-65c7-46af-9b26-61939f898314/king_arthur.txt\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - Content-Type\"\r\n\r\ntext/plain; charset=utf-8\r\n--96df544f6e8c2c3f3920b0f27f3db1f4\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Credential\"\r\n\r\nAKIAY7AU6GQD5KWBS3FG/20201119/eu-central-1/s3/aws4_request\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Security-Token\"\r\n\r\n\r\n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition:\ - \ form-data; name=\"X-Amz-Algorithm\"\r\n\r\nAWS4-HMAC-SHA256\r\n--96df544f6e8c2c3f3920b0f27f3db1f4\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Date\"\r\n\r\n20201119T200109Z\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - Policy\"\r\n\r\nCnsKCSJleHBpcmF0aW9uIjogIjIwMjAtMTEtMTlUMjA6MDE6MDlaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtYzg4MjQyZmEtMTNhZS0xMWViLWJjMzQtY2U2ZmQ5NjdhZjk1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvZWM3NWEyZGItNjVjNy00NmFmLTliMjYtNjE5MzlmODk4MzE0L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRDVLV0JTM0ZHLzIwMjAxMTE5L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMDExMTlUMjAwMTA5WiIgfQoJXQp9Cg==\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Signature\"\r\n\r\n9976059b9a5e6208ba4a0bedc40462d6ff1d0a6f1162280c1074f522b46e2a61\r\ - \n--96df544f6e8c2c3f3920b0f27f3db1f4\r\nContent-Disposition: form-data; name=\"\ - file\"; filename=\"king_arthur.txt\"\r\n\r\nKnights who say Ni!\r\n--96df544f6e8c2c3f3920b0f27f3db1f4--\r\ - \n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2314' - Content-Type: - - multipart/form-data; boundary=96df544f6e8c2c3f3920b0f27f3db1f4 - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: '' - headers: - Date: - - Thu, 19 Nov 2020 20:00:10 GMT - ETag: - - '"3676cdb7a927db43c846070c4e7606c7"' - Location: - - https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/sub-c-mock-key%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2Fec75a2db-65c7-46af-9b26-61939f898314%2Fking_arthur.txt - Server: - - AmazonS3 - x-amz-expiration: - - expiry-date="Sat, 21 Nov 2020 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-id-2: - - A6YngC58iQIuE2uLkm65EMcHqPNAyDx9gB4tk9uUclaKKke31YylNWTVATJvEEazROWaL2atqyM= - x-amz-request-id: - - 69D7186D457E54B4 - x-amz-server-side-encryption: - - AES256 - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test_message%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%22ec75a2db-65c7-46af-9b26-61939f898314%22%2C%20%22name%22%3A%20%22king_arthur.txt%22%7D%7D?meta=null&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16058160096948699"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:00:09 GMT - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files/ec75a2db-65c7-46af-9b26-61939f898314/king_arthur.txt?uuid=files_native_sync_uuid - response: - body: - string: '' - headers: - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - public, max-age=3831, immutable - Connection: - - keep-alive - Content-Length: - - '0' - Date: - - Thu, 19 Nov 2020 20:00:09 GMT - Location: - - https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/ec75a2db-65c7-46af-9b26-61939f898314/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20201119%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20201119T200000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=ba518b25b2ce6544646a697acd0d77dc94ad347d36f786cb1070b66c954cb62e - status: - code: 307 - message: Temporary Redirect -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/ec75a2db-65c7-46af-9b26-61939f898314/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20201119%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20201119T200000Z&X-Amz-Expires=3900&X-Amz-Signature=ba518b25b2ce6544646a697acd0d77dc94ad347d36f786cb1070b66c954cb62e&X-Amz-SignedHeaders=host - response: - body: - string: Knights who say Ni! - headers: - Accept-Ranges: - - bytes - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - text/plain; charset=utf-8 - Date: - - Thu, 19 Nov 2020 20:00:11 GMT - ETag: - - '"3676cdb7a927db43c846070c4e7606c7"' - Last-Modified: - - Thu, 19 Nov 2020 20:00:10 GMT - Server: - - AmazonS3 - Via: - - 1.1 a2a926ace399371954fc9fbb55fd02ab.cloudfront.net (CloudFront) - X-Amz-Cf-Id: - - xs9ND4aDZCOO9uyAnqO4ImETMQMgOcLcWeCVv_JoOxAJo_x2BGkHwA== - X-Amz-Cf-Pop: - - BUD50-C1 - X-Cache: - - Miss from cloudfront - x-amz-expiration: - - expiry-date="Sat, 21 Nov 2020 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-server-side-encryption: - - AES256 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.yaml b/tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.yaml deleted file mode 100644 index b6c82c32..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.yaml +++ /dev/null @@ -1,259 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/5.0.1 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xVWXOjOBD+K1t+nSGWOGzI1jwQfDKAjcFcu1spAQKDOTxGxMZT+e8r7CTjnbzs - A6Bu9fF19yfxc9AQRNpm8MgC8HUQI4IGjz8HWTx4HIhRNEpEM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TgXdTmn+2W41iQu91IXVxMg1ltCexYnvqQAt - nE6rNnysqPF7v31WauM5nYcCm8AVqnieEsqLNmC3fY0n+sC+ttUkPX30ojJAHy/q6H3gbeq3vkwo - LwCNATRnI0Tzq3+2LECjpHsVdyqvuTOCM5hHpbPv7ZA7a66c2c80azsLDDBzjH282UwczQGqrYNg - oV2uvDzpFxlorAM11yjCatP57onolnTRO2kXczrwOLWIPKeIODNLbjjHyyolvgtHmmcUPud0FKug - eZsXytUb57M33lEOYwXuQq+m9ucq5NRDPN+RN2zels7QmsIns4O2NZ12hu1/zuFudjGteZXJGT07 - nW7Ll7dzdNZtE7jZMk3MWvXMg6Sk3759vjKytKK/1+P9webHoxAKApQSAcb0uhyzIBKFEb06MYwA - HOOI4wTMiiIaCWPEhSgUeEkYY4DGooAwP3j95/X1XwAAAP//AwAHZJmquAcAAA== - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 04 Mar 2021 20:10:44 GMT - Transfer-Encoding: - - chunked - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: !!binary | - LS05YmRjYzMxOGMyODU1ZWM4MWQ4YzZiNmE4Mzg0ZGEzNQ0KQ29udGVudC1EaXNwb3NpdGlvbjog - Zm9ybS1kYXRhOyBuYW1lPSJ0YWdnaW5nIg0KDQo8VGFnZ2luZz48VGFnU2V0PjxUYWc+PEtleT5P - YmplY3RUVExJbkRheXM8L0tleT48VmFsdWU+MTwvVmFsdWU+PC9UYWc+PC9UYWdTZXQ+PC9UYWdn - aW5nPg0KLS05YmRjYzMxOGMyODU1ZWM4MWQ4YzZiNmE4Mzg0ZGEzNQ0KQ29udGVudC1EaXNwb3Np - dGlvbjogZm9ybS1kYXRhOyBuYW1lPSJrZXkiDQoNCnN1Yi1jLWM4ODI0MmZhLTEzYWUtMTFlYi1i - YzM0LWNlNmZkOTY3YWY5NS9mLXRJQWNOWEpPOW04MWZXVlZfby1m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DMWhiWG90WVd4 - bmIzSnBkR2h0SWpvZ0lrRlhVelF0U0UxQlF5MVRTRUV5TlRZaWZTd0tDUWw3SW5ndFlXMTZMV1Jo - ZEdVaU9pQWlNakF5TVRBek1EUlVNakF4TVRRMFdpSWdmUW9KWFFwOUNnPT0NCi0tOWJkY2MzMThj - Mjg1NWVjODFkOGM2YjZhODM4NGRhMzUNCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsg - bmFtZT0iWC1BbXotU2lnbmF0dXJlIg0KDQo0NzZiMTU1MTlmNTFkODhmNzIwYzg1NjZmOGUxYzAx - N2VjMzM1ZTI4OGE2NTdhM2JhYjU0OTU3ZTBhNzg1YWU0DQotLTliZGNjMzE4YzI4NTVlYzgxZDhj - NmI2YTgzODRkYTM1DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImZpbGUi - OyBmaWxlbmFtZT0ia2luZ19hcnRodXIudHh0Ig0KDQprbmlnaHRzb2ZuaTEyMzQ1eFfV0LUcHPC0 - jOgZUypICeqERdBWXaUFt/q9yQ87HtENCi0tOWJkY2MzMThjMjg1NWVjODFkOGM2YjZhODM4NGRh - MzUtLQ0K - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2343' - Content-Type: - - multipart/form-data; boundary=9bdcc318c2855ec81d8c6b6a8384da35 - User-Agent: - - PubNub-Python/5.0.1 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: '' - headers: - Date: - - Thu, 04 Mar 2021 20:10:46 GMT - ETag: - - '"31af664ac2b86f242369f06edf9dc460"' - Location: - - https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/sub-c-mock-key%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2F8cc6f88f-0b47-4e33-a918-11a87e2c983c%2Fking_arthur.txt - Server: - - AmazonS3 - x-amz-expiration: - - expiry-date="Sat, 06 Mar 2021 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-id-2: - - aKDSB+1kqtXh0NRTKdNpq5msRD8d9JP/7lMsg7EnX4AuEqOXuM2p4uWhrk/w3ajp4rcVaaudqnY= - x-amz-request-id: - - 9703A42693C1D1C5 - x-amz-server-side-encryption: - - AES256 - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/5.0.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%22a25pZ2h0c29mbmkxMjM0NZRrfJgUztWUV6pXv5zfmA3XciGL8ZdRVe31QyUHau4hbr1JeckbF6Xa4tpO5qF0zUI1fdvGQJkwa1KMeFl5QAqqDzT7A7cURYcPmbGoWTyEzaSQCz4uw6HsJsdfOOAhryz%2FJjb3x1qVjn3rpIFZnpm0EzjUBAS%2FltCuIFjSFLRJ%22?meta=null&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16148886452594352"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 04 Mar 2021 20:10:45 GMT - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/5.0.1 - method: GET - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files/8cc6f88f-0b47-4e33-a918-11a87e2c983c/king_arthur.txt?uuid=files_native_sync_uuid - response: - body: - string: '' - headers: - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - public, max-age=3195, immutable - Connection: - - keep-alive - Content-Length: - - '0' - Date: - - Thu, 04 Mar 2021 20:10:45 GMT - Location: - - https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/8cc6f88f-0b47-4e33-a918-11a87e2c983c/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20210304%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210304T200000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=e483478c649b8d03dce428694d49b6d25848b544f8cf5ff1ed5e0c8c67ead1d8 - status: - code: 307 - message: Temporary Redirect -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/5.0.1 - method: GET - uri: https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/8cc6f88f-0b47-4e33-a918-11a87e2c983c/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20210304%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20210304T200000Z&X-Amz-Expires=3900&X-Amz-Signature=e483478c649b8d03dce428694d49b6d25848b544f8cf5ff1ed5e0c8c67ead1d8&X-Amz-SignedHeaders=host - response: - body: - string: !!binary | - a25pZ2h0c29mbmkxMjM0NXhX1dC1HBzwtIzoGVMqSAnqhEXQVl2lBbf6vckPOx7R - headers: - Accept-Ranges: - - bytes - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - text/plain; charset=utf-8 - Date: - - Thu, 04 Mar 2021 20:10:46 GMT - ETag: - - '"31af664ac2b86f242369f06edf9dc460"' - Last-Modified: - - Thu, 04 Mar 2021 20:10:46 GMT - Server: - - AmazonS3 - Via: - - 1.1 697e9166a29142e018dae0e083c25f18.cloudfront.net (CloudFront) - X-Amz-Cf-Id: - - F2hjMRsbVq3UK_toZqiKWoaF9ZObgh7Hf_8GTJTeLjXmszc2EGpPew== - X-Amz-Cf-Pop: - - ZRH50-C1 - X-Cache: - - Miss from cloudfront - x-amz-expiration: - - expiry-date="Sat, 06 Mar 2021 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-server-side-encryption: - - AES256 - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/download_url.yaml b/tests/integrational/fixtures/native_sync/file_upload/download_url.yaml deleted file mode 100644 index 8070421a..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/download_url.yaml +++ /dev/null @@ -1,182 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xVW3eiSBD+K3t8nSF2c1HJnnlQvBJAEWwuu3tyGmgQ5eJIE8Wc/PdtNMm4k5d9 - ALqqq6q/r+oDXjsVxbSuOo88AN87Eaa48/jaSaPOY0eOoSiGYsgRzG5iD0scDniRiwaQxBCKvCyL - ne+dAueERe/TInnGR7qtjw/0TDtv3ztxmpHn+pCVOHo+kp81qWhbvD5mLH5L6aF67HYPdVDUAZcX - JC+rpiBcm1VxpOZCUtAjzjjIHY7RQyU84BxfygKfqoewzLvs6JzQbdlCXS0tm9nkfEiPmKZl8cyY - tKh4wAMOQg7KNg8eAf8Igc8C4/KYP8cpySLG/K/Xzp40LJjiJGEs2P4Lzuo2/e8aACG0b/6rQT5d - FqG/ee7NJ9LczGWwIyG1bW1RjHFT3Xa7n9s3G7Xn3RzwPeLO9e757YTuVwzd/yBlI/hg1t5/sapY - v0MuHAx4kY8xBwVMWI9IwAWhILK29+JI7vVxL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+xJUGUwphIA4nHQOoFPUiEHpAjvh/1+3FfDiQxkkM8 - CCIhAoM+P4j6Mg7jQR+QvhxCofP2z9vbvwAAAP//AwAmYIljuAcAAA== - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 19 Nov 2020 20:01:10 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: "--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - tagging\"\r\n\r\nObjectTTLInDays1\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - key\"\r\n\r\nsub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/9f144c4c-ea4c-46a5-ab24-d81ef1142994/king_arthur.txt\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - Content-Type\"\r\n\r\ntext/plain; charset=utf-8\r\n--81a347c1a55f80c7a78e3ce009fb4b6e\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Credential\"\r\n\r\nAKIAY7AU6GQD5KWBS3FG/20201119/eu-central-1/s3/aws4_request\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Security-Token\"\r\n\r\n\r\n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition:\ - \ form-data; name=\"X-Amz-Algorithm\"\r\n\r\nAWS4-HMAC-SHA256\r\n--81a347c1a55f80c7a78e3ce009fb4b6e\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Date\"\r\n\r\n20201119T200210Z\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - Policy\"\r\n\r\nCnsKCSJleHBpcmF0aW9uIjogIjIwMjAtMTEtMTlUMjA6MDI6MTBaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtYzg4MjQyZmEtMTNhZS0xMWViLWJjMzQtY2U2ZmQ5NjdhZjk1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvOWYxNDRjNGMtZWE0Yy00NmE1LWFiMjQtZDgxZWYxMTQyOTk0L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRDVLV0JTM0ZHLzIwMjAxMTE5L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMDExMTlUMjAwMjEwWiIgfQoJXQp9Cg==\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Signature\"\r\n\r\n5345cfe5852a056b61e3609d27d77f79b54d9ca8bd3d08728d79acf870e79c13\r\ - \n--81a347c1a55f80c7a78e3ce009fb4b6e\r\nContent-Disposition: form-data; name=\"\ - file\"; filename=\"king_arthur.txt\"\r\n\r\nKnights who say Ni!\r\n--81a347c1a55f80c7a78e3ce009fb4b6e--\r\ - \n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2314' - Content-Type: - - multipart/form-data; boundary=81a347c1a55f80c7a78e3ce009fb4b6e - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: '' - headers: - Date: - - Thu, 19 Nov 2020 20:01:11 GMT - ETag: - - '"3676cdb7a927db43c846070c4e7606c7"' - Location: - - https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/sub-c-mock-key%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2F9f144c4c-ea4c-46a5-ab24-d81ef1142994%2Fking_arthur.txt - Server: - - AmazonS3 - x-amz-expiration: - - expiry-date="Sat, 21 Nov 2020 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-id-2: - - ejWPHQ9G8PEIB1Levfzo41myQABuJy2DBKd3Rw9GUV+J6Qk746gPHGAxeRsXwIJtzwAouCUCYCA= - x-amz-request-id: - - 3DC7349C6A117585 - x-amz-server-side-encryption: - - AES256 - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test_message%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%229f144c4c-ea4c-46a5-ab24-d81ef1142994%22%2C%20%22name%22%3A%20%22king_arthur.txt%22%7D%7D?meta=null&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16058160706139422"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:01:10 GMT - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files/9f144c4c-ea4c-46a5-ab24-d81ef1142994/king_arthur.txt?uuid=files_native_sync_uuid - response: - body: - string: '' - headers: - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - public, max-age=3770, immutable - Connection: - - keep-alive - Content-Length: - - '0' - Date: - - Thu, 19 Nov 2020 20:01:10 GMT - Location: - - https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/9f144c4c-ea4c-46a5-ab24-d81ef1142994/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20201119%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20201119T200000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=3a643977ebb796baafbaa45ad35bedffbb0c7a83adcf84f5ee03eb0edeca49ad - status: - code: 307 - message: Temporary Redirect -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.yaml b/tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.yaml deleted file mode 100644 index ac718cb4..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.yaml +++ /dev/null @@ -1,34 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.5.4 - method: GET - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files/random_file_id/random_file_name?auth=test_auth_key&uuid=files_native_sync_uuid - response: - body: - string: '' - headers: - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - public, max-age=686, immutable - Connection: - - keep-alive - Content-Length: - - '0' - Date: - - Wed, 21 Oct 2020 17:52:34 GMT - Location: - - https://files-eu-central-1.pndsn.com/sub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/random_file_id/random_file_name?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQD5KWBS3FG%2F20201021%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20201021T170000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=6faaeb530e4905cea2969d0e58c19dc9cb9b95dfb9e4ff790459c289f641fd7f - status: - code: 307 - message: Temporary Redirect -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.yaml b/tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.yaml deleted file mode 100644 index 3bfe1c19..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.yaml +++ /dev/null @@ -1,58 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/4.5.4 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xV23KjOBD9lS2/zhBLYByTrXlw8JUBxxgsLrtbKYHEzVw8RsTGU/n3FXaS8U5e - 9gGjbp1une4+yD97NcOsqXsPIgBfewQz3Hv42UtJ76E3IlSK7qkkACINhAEBsjASiSJI90GAIziK - pGHY+9orcUE5epeW8TM+sKQ53LET671+7UVpTp+bfV5h8nygPxpasy55c8g5PmFsXz/0+/smKJtA - KEpaVHVbUqG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wA62sjh/BKfLnNQq/FOo6020J0ZoynMwgLtOhx2ZvVFM7uZbm1n/grM0GpHNpsJ0hHQbAP4 - C/180eXJmCxPuoig7qzyoNy0nnNkhqWcjVZJiGQAV9Ly0EV5KJlpdOV5vyxj5jlwqLur3JNQy7nK - urt54Vq9aj590x3XMFVhErgVx5/KQNL2ZJ6wN27uls/QmsJHs4W2NZ22K9v7fIazSQiv+Skdp5xv - a0ymx7fv6PxkT4GTLuPIrDTX3Ctq/O3b5ysjjUv+93q4/bAJvydhROUhFpUhHkHML9tRGI2GAAay - LMlAggGWIJQDGcABIWKoRGIwlOUowrJCot7rP6+v/wIAAP//AwBA2W25uAcAAA== - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Wed, 21 Oct 2020 17:38:14 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.yaml b/tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.yaml deleted file mode 100644 index a4cbffaf..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.yaml +++ /dev/null @@ -1,97 +0,0 @@ -interactions: -- request: - body: '' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '20' - User-Agent: - - PubNub-Python/4.5.4 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xVW5eiOBD+L77uMCZcvPSbDV6ggRaFcNnd0yeQoCAXR6I2zun/vkHHGWf6ZR9i - qipVqa+qvuD3XsMwOza9JxGALz2CGe49fe9lpPfUU9IRIeJoLACIiSADZSyMZCALIwkTeZAqQxin - vS+9CpeUe6dZQd+UMu59fLnJx31RY/J2oN+OtGHdrcdDwR23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DsyXxzm9PUPsXVqogrh6FFcb7Gq/q9b0O92rDQ - hwPTt9vI7/xW+9A/Z6/ZJHM8ZjhoJznIE1dwNrU9FjiFdVntkhPnXmtpU87J6ekTZyTrYoozKbms - 0oTPhXfuQu4c4nykKtzGQc0SEeUkMPZksWNkPj5EvnzNq1e3PtDWkE1/xmjG/efklJQFwHNww4aI - a6tQd72ZZiJbd1wd2tnnHNF8BnjNA14zx8vfkMtxI+cq397O81jdFEStwMvnz0S2qfjf5+G3x0wG - WAYglukAUjqkMEkHUqrIlMijhECRwOEwTmUwxLEykDpZGqRjKqUSERUFDnsf/358/AcAAP//AwDj - 9pvemAcAAA== - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Wed, 21 Oct 2020 20:19:42 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: '' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '10488023' - Content-Type: - - multipart/form-data; boundary=be1bf8971123ddecbbd5ce51cb07fe71 - User-Agent: - - PubNub-Python/4.5.4 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: ' - - EntityTooLargeYour proposed upload exceeds the - maximum allowed size524468152428808W8NAT1S1REK9Y3Pl075W1QNv/VxQLeuGXoSSaOlFVJ/p4Bo3XRKrD3vf9m9TSAvmnqK8mWnMmHRRLXHdSUmCkyoG+U=' - headers: - Connection: - - close - Content-Type: - - application/xml - Date: - - Wed, 21 Oct 2020 20:19:49 GMT - Server: - - AmazonS3 - x-amz-id-2: - - l075W1QNv/VxQLeuGXoSSaOlFVJ/p4Bo3XRKrD3vf9m9TSAvmnqK8mWnMmHRRLXHdSUmCkyoG+U= - x-amz-request-id: - - 8W8NAT1S1REK9Y3P - status: - code: 400 - message: Bad Request -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/list_files.yaml b/tests/integrational/fixtures/native_sync/file_upload/list_files.yaml deleted file mode 100644 index 1c752f10..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/list_files.yaml +++ /dev/null @@ -1,41 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.5.4 - method: GET - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/files?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA5TSwY5VIQwG4HdhfWqAFmjPc7jSTEyBojfOHJN7z00mTubdxbtwqbiEQL/0b9/c - 7dTzfnN79H5zXU91++c3d+iLud19vxxfv+j1/Ha/fjhfT7e5S5/XsSr5FAxCJgJqxsBVEihxziWE - Qd7m29vl5yxCvLl2NT3t8dVHD8FDDB9D2RF38p/c+/YvMRX0ySNDTTxFEwPtPQLmlK39Nlv/Iwb5 - i5j2wCti1lFaDxkMDYGEI3BMHVJvgzFUbl4XxLR72VNZEYtvWKIgKLIBMXvQKYHZTHVISD21tVQn - utQjoygmyxALFSC1AlLFQ8+Ve2zSfOQF8dEjLYkSuY6SDAaKzB4rg7bagVONoqVSX0+VllKtnLKW - GEHFD6AUK2jBArmbkKWGanFB/I9UW/VkiHOEfsxdTXOONWaC2mnEjq3EsriruKOsiEMpq1qDNMLc - VSWBimX2WIb3gqULl1XxkerT5g6b9ffj/vw8n/+4H/Mg778AAAD//wMAINFBWi8EAAA= - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Wed, 21 Oct 2020 17:36:44 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message.yaml b/tests/integrational/fixtures/native_sync/file_upload/publish_file_message.yaml deleted file mode 100644 index d08c529b..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message.yaml +++ /dev/null @@ -1,36 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%222222%22%2C%20%22name%22%3A%20%22test%22%7D%7D?meta=%7B%7D&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16058161010686497"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:01:41 GMT - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.yaml b/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.yaml deleted file mode 100644 index b0ba18c3..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.yaml +++ /dev/null @@ -1,36 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%222222%22%2C%20%22name%22%3A%20%22test%22%7D%7D?meta=%7B%7D&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16058161166436271"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:01:56 GMT - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.yaml b/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.yaml deleted file mode 100644 index 2c5e2b08..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.yaml +++ /dev/null @@ -1,36 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%222222%22%2C%20%22name%22%3A%20%22test%22%7D%7D?meta=%7B%7D&norep=false&ptto=16057799474000000&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16057799474000000"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 19:56:53 GMT - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json b/tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json index a6f96753..d6a953f7 100644 --- a/tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json +++ b/tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json @@ -7,134 +7,26 @@ "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_native_sync_ch/generate-upload-url?uuid=uuid-mock", "body": "{\"name\": \"king_arthur.txt\"}", "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" + "host": [ + "ps.pndsn.com" ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ + "accept": [ "*/*" ], - "Connection": [ - "keep-alive" - ], - "Content-type": [ - "application/json" - ], - "Content-Length": [ - "27" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Connection": [ - "keep-alive" - ], - "Content-Type": [ - "application/json" - ], - "Content-Length": [ - "1989" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ], - "Access-Control-Allow-Origin": [ - "*" - ] - }, - "body": { - "string": "{\"status\":200,\"data\":{\"id\":\"6144738d-4719-4bcb-9574-759c87ba2dda\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2023-07-04T19:50:52Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/6144738d-4719-4bcb-9574-759c87ba2dda/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20230704/eu-central-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20230704T195052Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjMtMDctMDRUMTk6NTA6NTJaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtODhiOWRiYWItMjBmMS00OGQ0LThkZjMtOWJmYWJiMDBjMGI0L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvNjE0NDczOGQtNDcxOS00YmNiLTk1NzQtNzU5Yzg3YmEyZGRhL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjMwNzA0L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMzA3MDRUMTk1MDUyWiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"09f9e541b894c0f477295cd13d346f66b0b1ce5252ab18eb3f7afadc63e1896b\"}]}}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://pubnub-mnemosyne-files-eu-central-1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"headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ + "accept-encoding": [ "gzip, deflate" ], - "Accept": [ - "*/*" - ], - "Connection": [ + "connection": [ "keep-alive" ], - "Content-Length": [ - "2343" - ], - "Content-Type": [ - "multipart/form-data; boundary=8599a9a8e2783683b146b515952288fd" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "x-amz-expiration": [ - "expiry-date=\"Thu, 06 Jul 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-request-id": [ - "FG5BVM2Q7DVWN98W" - ], - "ETag": [ - "\"31af664ac2b86f242369f06edf9dc460\"" - ], - "Server": [ - "AmazonS3" - ], - "Location": [ - "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/{PN_KEY_SUBSCRIBE}%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2F6144738d-4719-4bcb-9574-759c87ba2dda%2Fking_arthur.txt" - ], - "x-amz-id-2": [ - "O3Aq1zRp/A/AREfBqIqd4D43wUGqk8QMTUZtm+hmUyW4it+CNzdRyYvSHsuO/kFr1JozHbWP/OQ=" + "user-agent": [ + "PubNub-Python/9.1.0" ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:53 GMT" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_native_sync_ch/0/%22a25pZ2h0c29mbmkxMjM0NZRrfJgUztWUV6pXv5zfmA3XciGL8ZdRVe31QyUHau4hbr1JeckbF6Xa4tpO5qF0zbp8T5zlm4YRqSNPOozSZbJK7NBLSrY1XH4sqRMmw9kqbFP0XZ1hkGhwY4A6xz5HK7NJA7AgYYcYNGHC89fuKpkY0O3GF50zbH86R6Jra3YM%22?meta=null&store=1&ttl=222&uuid=uuid-mock", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" + "content-type": [ + "application/json" ], - "Connection": [ - "keep-alive" + "content-length": [ + "27" ] } }, @@ -144,154 +36,27 @@ "message": "OK" }, "headers": { - "Cache-Control": [ - "no-cache" - ], - "Connection": [ - "keep-alive" + "Date": [ + "Fri, 06 Dec 2024 23:08:26 GMT" ], "Content-Type": [ - "text/javascript; charset=\"UTF-8\"" + "application/json" ], "Content-Length": [ - "30" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ], - "Access-Control-Allow-Origin": [ - "*" - ], - "Access-Control-Allow-Methods": [ - "GET" - ] - }, - "body": { - "string": "[1,\"Sent\",\"16885001923916260\"]" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_native_sync_ch/files/6144738d-4719-4bcb-9574-759c87ba2dda/king_arthur.txt?uuid=uuid-mock", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" + "1982" ], "Connection": [ "keep-alive" - ] - } - }, - "response": { - "status": { - "code": 307, - "message": "Temporary Redirect" - }, - "headers": { - "Cache-Control": [ - "public, max-age=848, immutable" ], - "Location": [ - "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/6144738d-4719-4bcb-9574-759c87ba2dda/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20230704%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230704T190000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=eefac0ff6d196b2e9b7e630e54e2abcecb0ab9b2e954742e3e43d866e373f54e" + "Access-Control-Allow-Credentials": [ + "true" ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "0" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ], - "Access-Control-Allow-Origin": [ + "Access-Control-Expose-Headers": [ "*" ] }, "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/6144738d-4719-4bcb-9574-759c87ba2dda/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20230704%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230704T190000Z&X-Amz-Expires=3900&X-Amz-Signature=eefac0ff6d196b2e9b7e630e54e2abcecb0ab9b2e954742e3e43d866e373f54e&X-Amz-SignedHeaders=host", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "x-amz-expiration": [ - "expiry-date=\"Thu, 06 Jul 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "X-Amz-Cf-Id": [ - "0su1Z_4V03uqmqXkurjllb3XWVKGorOUeSRzacQRIsQfEadHeyI-Sg==" - ], - "Accept-Ranges": [ - "bytes" - ], - "Via": [ - "1.1 116bbd3369f3a47b2d68a49a57fa7b40.cloudfront.net (CloudFront)" - ], - "ETag": [ - "\"31af664ac2b86f242369f06edf9dc460\"" - ], - "Server": [ - "AmazonS3" - ], - "Connection": [ - "keep-alive" - ], - "Content-Type": [ - "text/plain; charset=utf-8" - ], - "Last-Modified": [ - "Tue, 04 Jul 2023 19:49:53 GMT" - ], - "X-Amz-Cf-Pop": [ - "WAW51-P3" - ], - "X-Cache": [ - "Miss from cloudfront" - ], - "Content-Length": [ - "48" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:53 GMT" - ] - }, - "body": { - "binary": "a25pZ2h0c29mbmkxMjM0NXhX1dC1HBzwtIzoGVMqSAnqhEXQVl2lBbf6vckPOx7R" + "string": "{\"status\":200,\"data\":{\"id\":\"6fad526d-ab5f-4941-8d01-5a2630b34ab1\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-06T23:09:26Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/6fad526d-ab5f-4941-8d01-5a2630b34ab1/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241206/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241206T230926Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDZUMjM6MDk6MjZaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvNmZhZDUyNmQtYWI1Zi00OTQxLThkMDEtNWEyNjMwYjM0YWIxL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA2L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDZUMjMwOTI2WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"c80dc1a774e80a5c2545944e21b935d5191a58e4471ae872ea88e4d375eaa702\"}]}}" } } } diff --git a/tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json b/tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json index 097afc48..edd94631 100644 --- a/tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json +++ b/tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json @@ -7,134 +7,26 @@ "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_native_sync_ch/generate-upload-url?uuid=uuid-mock", "body": "{\"name\": \"king_arthur.txt\"}", "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" + "host": [ + "ps.pndsn.com" ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ + "accept": [ "*/*" ], - "Connection": [ - "keep-alive" - ], - "Content-type": [ - "application/json" - ], - "Content-Length": [ - "27" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "Connection": [ - "keep-alive" - ], - "Content-Type": [ - "application/json" - ], - "Content-Length": [ - "1989" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:51 GMT" - ], - "Access-Control-Allow-Origin": [ - "*" - ] - }, - "body": { - "string": "{\"status\":200,\"data\":{\"id\":\"4c8364f9-3d47-4196-8b0a-d1311a97e8d1\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2023-07-04T19:50:51Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/4c8364f9-3d47-4196-8b0a-d1311a97e8d1/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20230704/eu-central-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20230704T195051Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjMtMDctMDRUMTk6NTA6NTFaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtODhiOWRiYWItMjBmMS00OGQ0LThkZjMtOWJmYWJiMDBjMGI0L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvNGM4MzY0ZjktM2Q0Ny00MTk2LThiMGEtZDEzMTFhOTdlOGQxL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjMwNzA0L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMzA3MDRUMTk1MDUxWiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"ca3764c9c3cdf3be6d9fda3d53e2ab74f125abf70cb41110450ac101fb55ff68\"}]}}" - } - } - }, - { - "request": { - "method": "POST", - "uri": "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/", - "body": { - "binary": "LS0zMzRhYmM0MTAyMzEwODE4ZWUxNTAyODJiNTRjNTYwOQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJ0YWdnaW5nIg0KDQo8VGFnZ2luZz48VGFnU2V0PjxUYWc+PEtleT5PYmplY3RUVExJbkRheXM8L0tleT48VmFsdWU+MTwvVmFsdWU+PC9UYWc+PC9UYWdTZXQ+PC9UYWdnaW5nPg0KLS0zMzRhYmM0MTAyMzEwODE4ZWUxNTAyODJiNTRjNTYwOQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJrZXkiDQoNCnN1Yi1jLTg4YjlkYmFiLTIwZjEtNDhkNC04ZGYzLTliZmFiYjAwYzBiNC9mLXRJQWNOWEpPOW04MWZXVlZfby1mU1EtdmV1cE5yVGxvVkFVUGJlVVFRLzRjODM2NGY5LTNkNDctNDE5Ni04YjBhLWQxMzExYTk3ZThkMS9raW5nX2FydGh1ci50eHQNCi0tMzM0YWJjNDEwMjMxMDgxOGVlMTUwMjgyYjU0YzU2MDkNCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0iQ29udGVudC1UeXBlIg0KDQp0ZXh0L3BsYWluOyBjaGFyc2V0PXV0Zi04DQotLTMzNGFiYzQxMDIzMTA4MThlZTE1MDI4MmI1NGM1NjA5DQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9IlgtQW16LUNyZWRlbnRpYWwiDQoNCkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjMwNzA0L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QNCi0tMzM0YWJjNDEwMjMxMDgxOGVlMTUwMjgyYjU0YzU2M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FsD1pXILAs96HbdvkteQfzeLPZFVoNCi0tMzM0YWJjNDEwMjMxMDgxOGVlMTUwMjgyYjU0YzU2MDktLQ0K" - }, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ + "accept-encoding": [ "gzip, deflate" ], - "Accept": [ - "*/*" - ], - "Connection": [ + "connection": [ "keep-alive" ], - "Content-Length": [ - "2343" - ], - "Content-Type": [ - "multipart/form-data; boundary=334abc4102310818ee150282b54c5609" - ] - } - }, - "response": { - "status": { - "code": 204, - "message": "No Content" - }, - "headers": { - "x-amz-expiration": [ - "expiry-date=\"Thu, 06 Jul 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-request-id": [ - "HGJZYD4BKZEXHRBD" - ], - "ETag": [ - "\"34becf969765be57d7444e86655ba3e1\"" - ], - "Server": [ - "AmazonS3" - ], - "Location": [ - "https://pubnub-mnemosyne-files-eu-central-1-prd.s3.eu-central-1.amazonaws.com/{PN_KEY_SUBSCRIBE}%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2F4c8364f9-3d47-4196-8b0a-d1311a97e8d1%2Fking_arthur.txt" - ], - "x-amz-id-2": [ - "v60LspWXjLjtaBRzmZXEXtOEAwxw7u5UbfYoUn6Fab0jm9Y/i7ShapdWHe8L9a1anirQ5xPkyW0=" + "user-agent": [ + "PubNub-Python/9.1.0" ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ] - }, - "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_native_sync_ch/0/%22a25pZ2h0c29mbmkxMjM0NWlfrCKleYrAEWTkbAcZWmWNMYnBswiHQRNv3E%2Be9mwyA7pQMEzjEBgkyw0%2B5u%2BMOCRsrIyMqQV18bKtl18kvhtrPqmYunT84n9djZ2Vlo%2FNliZ29yx8TVeeI1YJxS3fdJ9%2FPwVKuA51%2BmfdRA2DcgsOBlkmMsBka4Yj%2Fl0nVbOk%22?meta=null&store=1&ttl=222&uuid=uuid-mock", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" + "content-type": [ + "application/json" ], - "Connection": [ - "keep-alive" + "content-length": [ + "27" ] } }, @@ -144,154 +36,27 @@ "message": "OK" }, "headers": { - "Cache-Control": [ - "no-cache" - ], - "Connection": [ - "keep-alive" + "Date": [ + "Fri, 06 Dec 2024 23:08:25 GMT" ], "Content-Type": [ - "text/javascript; charset=\"UTF-8\"" + "application/json" ], "Content-Length": [ - "30" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:51 GMT" - ], - "Access-Control-Allow-Origin": [ - "*" - ], - "Access-Control-Allow-Methods": [ - "GET" - ] - }, - "body": { - "string": "[1,\"Sent\",\"16885001917892621\"]" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://ps.pndsn.com/v1/files/{PN_KEY_SUBSCRIBE}/channels/files_native_sync_ch/files/4c8364f9-3d47-4196-8b0a-d1311a97e8d1/king_arthur.txt?uuid=uuid-mock", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" + "1982" ], "Connection": [ "keep-alive" - ] - } - }, - "response": { - "status": { - "code": 307, - "message": "Temporary Redirect" - }, - "headers": { - "Cache-Control": [ - "public, max-age=849, immutable" ], - "Location": [ - "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/4c8364f9-3d47-4196-8b0a-d1311a97e8d1/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20230704%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230704T190000Z&X-Amz-Expires=3900&X-Amz-SignedHeaders=host&X-Amz-Signature=53ddeccd7481586b498b8d52a3fca1cc3c509ee0e4db75114bdda960f42ad66a" + "Access-Control-Allow-Credentials": [ + "true" ], - "Connection": [ - "keep-alive" - ], - "Content-Length": [ - "0" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:51 GMT" - ], - "Access-Control-Allow-Origin": [ + "Access-Control-Expose-Headers": [ "*" ] }, "body": { - "string": "" - } - } - }, - { - "request": { - "method": "GET", - "uri": "https://files-eu-central-1.pndsn.com/{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/4c8364f9-3d47-4196-8b0a-d1311a97e8d1/king_arthur.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAY7AU6GQDV5LCPVEX%2F20230704%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230704T190000Z&X-Amz-Expires=3900&X-Amz-Signature=53ddeccd7481586b498b8d52a3fca1cc3c509ee0e4db75114bdda960f42ad66a&X-Amz-SignedHeaders=host", - "body": null, - "headers": { - "User-Agent": [ - "PubNub-Python/7.1.0" - ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ - "*/*" - ], - "Connection": [ - "keep-alive" - ] - } - }, - "response": { - "status": { - "code": 200, - "message": "OK" - }, - "headers": { - "x-amz-expiration": [ - "expiry-date=\"Thu, 06 Jul 2023 00:00:00 GMT\", rule-id=\"Archive file 1 day after creation\"" - ], - "x-amz-server-side-encryption": [ - "AES256" - ], - "X-Amz-Cf-Id": [ - "pq8WX-lwob2MNiiVsHdZjXEKD2YxDtB-BxS5KqG129X5DH-IN0-KBw==" - ], - "Accept-Ranges": [ - "bytes" - ], - "Via": [ - "1.1 cffe8a62b982ad6d295e862637dbfaf2.cloudfront.net (CloudFront)" - ], - "ETag": [ - "\"34becf969765be57d7444e86655ba3e1\"" - ], - "Server": [ - "AmazonS3" - ], - "Connection": [ - "keep-alive" - ], - "Content-Type": [ - "text/plain; charset=utf-8" - ], - "Last-Modified": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ], - "X-Amz-Cf-Pop": [ - "WAW51-P3" - ], - "X-Cache": [ - "Miss from cloudfront" - ], - "Content-Length": [ - "48" - ], - "Date": [ - "Tue, 04 Jul 2023 19:49:52 GMT" - ] - }, - "body": { - "binary": "a25pZ2h0c29mbmkxMjM0NVkTqCC+fpiHAy6xbA9aVyCwLPeh23b5LXkH83iz2RVa" + "string": "{\"status\":200,\"data\":{\"id\":\"0c1cd496-4371-4d12-b4ec-3cce862430df\",\"name\":\"king_arthur.txt\"},\"file_upload_request\":{\"url\":\"https://pubnub-mnemosyne-files-us-east-1-prd.s3.dualstack.us-east-1.amazonaws.com/\",\"method\":\"POST\",\"expiration_date\":\"2024-12-06T23:09:25Z\",\"form_fields\":[{\"key\":\"tagging\",\"value\":\"\\u003cTagging\\u003e\\u003cTagSet\\u003e\\u003cTag\\u003e\\u003cKey\\u003eObjectTTLInDays\\u003c/Key\\u003e\\u003cValue\\u003e1\\u003c/Value\\u003e\\u003c/Tag\\u003e\\u003c/TagSet\\u003e\\u003c/Tagging\\u003e\"},{\"key\":\"key\",\"value\":\"{PN_KEY_SUBSCRIBE}/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/0c1cd496-4371-4d12-b4ec-3cce862430df/king_arthur.txt\"},{\"key\":\"Content-Type\",\"value\":\"text/plain; charset=utf-8\"},{\"key\":\"X-Amz-Credential\",\"value\":\"AKIAY7AU6GQDV5LCPVEX/20241206/us-east-1/s3/aws4_request\"},{\"key\":\"X-Amz-Security-Token\",\"value\":\"\"},{\"key\":\"X-Amz-Algorithm\",\"value\":\"AWS4-HMAC-SHA256\"},{\"key\":\"X-Amz-Date\",\"value\":\"20241206T230925Z\"},{\"key\":\"Policy\",\"value\":\"CnsKCSJleHBpcmF0aW9uIjogIjIwMjQtMTItMDZUMjM6MDk6MjVaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtdXMtZWFzdC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtZDBiOGU1NDItMTJhMC00MWM0LTk5OWYtYTJkNTY5ZGM0MjU1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvMGMxY2Q0OTYtNDM3MS00ZDEyLWI0ZWMtM2NjZTg2MjQzMGRmL2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRFY1TENQVkVYLzIwMjQxMjA2L3VzLWVhc3QtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyNDEyMDZUMjMwOTI1WiIgfQoJXQp9Cg==\"},{\"key\":\"X-Amz-Signature\",\"value\":\"13f8bebac2c91148fc71ec50aaefd3b9f03150b2b969f45f82a0e6c3484395eb\"}]}}" } } } diff --git a/tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.yaml b/tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.yaml deleted file mode 100644 index 8d532a7d..00000000 --- a/tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.yaml +++ /dev/null @@ -1,150 +0,0 @@ -interactions: -- request: - body: '{"name": "king_arthur.txt"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '27' - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://ps.pndsn.com/v1/files/sub-c-mock-key/channels/files_native_sync_ch/generate-upload-url?uuid=files_native_sync_uuid - response: - body: - string: !!binary | - H4sIAAAAAAAAA4xVW3OiSBT+K1u+zhC7m0skW/Ng8AYDRAW57W6lGmgQ5OJIE8Wp/PdtNMm4k5e1 - Culz/845H/Bz0FBM22bwgAD4OogxxYOHn4MsHjwMJDQSeMDfc/dYxJwQoxGHIyxxMkpILIsIRJE0 - +DqocEmY9y6r0md8oNv2cEdPdPD6dZBkBXlu90WN4+cD+dGShvbJ20PB/LeU7puH4XDfhlUbcmVF - yrrpKsL1UQ1HWi4iFT3ggoPc/hDfNfwdLvG5rvCxuYvqcshKl4Ru6x7q8smymUxO++yAaVZXz6yT - HhUCCHAQclC2EXgA/AOUAuaY1IfyOclIEbPO//o52JGOOVOcpqwLZn/BRduH/90CwEf2VX8RyIfK - IvQ3za34nXRX8SnMSURtW1erCe6aq3X4Yb7KTl/vqoBvHjeqN81vFYafMQz/g5St4L2z/v9XVw2b - d8RFoxESUII5yGPCZkRCLox4gY1dSmJZuseJLA4TjqrjyPS0J7kcwcR1nOeaS6wV90LavXmwi9oZ - b5Yh2axWw//Dl+FnmrxjVOqKso1zdrcnN2ApOdHhvsBZ9ecf0RYfGkK/tTThRjehHjcuz5xyIDFL - kOHiJnz8XR379+ONNF9NxO/uo8XP5sOeFRBCeXjLsmHDDxm3hA+q/p7fIlF7yGjH2fWOVDc1PnmO - i7RmntvyFohrCdzCGCuctRgjUfoUNOkZ+8v/HSPjLeB71v7yX9ZFFt0uVKma74qlFWTxuI/KGcCu - 3Kp5naq5ejTyMTXsKbuKDTtLxsSQDDvAanbsY/IQiTvsrffsfu5j3GOtKV6T+ZWTY+SAS57qEfql - CP0M0rB0aMibYlhuaFAWTeAZNPA21EdOGy+0baiAk+49doGiyfqY5XKaLPCmma6MM22x3gYo3odl - dJGXsw/5y+UMzSKeCCNnPquW+UkPvN0XG2k/AtcEzmxtWK449b3ivFTki205C7bhwimW+XSkw/fz - 8eUaf71vWA/v5wAVbXAWMs9iva+KUC2dE5tDqmbrA8t3wRTxTqa7BvXPqWDkqy4o+9mZ28ACJ8Pt - bVpunFes3w0KypVo5vE2yHdQRz6Np8WjD0Tf2o3E0E5PQRG7TiG/6G5gbyyIAs852pW2Ceeyu3Kc - lV86zsaZvpi5KpgT42icI2qiKfQtAIKJKujuLPdtnz7ZWhm4rJatHn1kIB1RNrM48T0N4IXT6dVa - iBUtfp+3j+Q2nrN9KLAJXLGK5yllvGgDtOl7PLIL9r09TdLjxywqE/T5oo69D7x1/TaXCeMFYDmA - 7qzFaH6Jz9QCNEq600in9RgpyWAelc6u98PurLlwZjfTrc0sMMHMMXfxej1xdAdotgGChX6+8PLE - eCnqyIG6axZhte5890gNSz4bnbyNeQN4vFZEnlNE/CpLrjjv1Sqlvgsl3TMLn3c6hlXUvfUL4+qV - 89kb7xiHiQK3oVcz/1MV8to+nm/pGzZvw3ZoTeHjqoO2NZ12pu1/ruGutzHr+SkbZwxvZ0ymp7fn - iO1qitxMTZNVrXmrvayk3759fmVkacU+r4fbB3s0kiQo8VhGKBakmE+ADASJhFgQAAEyxAlE4n0o - xQBGmESjML5nv4SXBVlGkSwPXv95ff0XAAD//wMA2y8GvLgHAAA= - headers: - Access-Control-Allow-Origin: - - '*' - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Thu, 19 Nov 2020 20:02:16 GMT - Vary: - - Accept-Encoding - status: - code: 200 - message: OK -- request: - body: "--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - tagging\"\r\n\r\nObjectTTLInDays1\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - key\"\r\n\r\nsub-c-mock-key/f-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ/62843037-7a5a-4d28-aca6-92fed9520cc6/king_arthur.txt\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - Content-Type\"\r\n\r\ntext/plain; charset=utf-8\r\n--9a2cc9a17c70417a691d5d50320d1a2b\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Credential\"\r\n\r\nAKIAY7AU6GQD5KWBS3FG/20201119/eu-central-1/s3/aws4_request\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Security-Token\"\r\n\r\n\r\n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition:\ - \ form-data; name=\"X-Amz-Algorithm\"\r\n\r\nAWS4-HMAC-SHA256\r\n--9a2cc9a17c70417a691d5d50320d1a2b\r\ - \nContent-Disposition: form-data; name=\"X-Amz-Date\"\r\n\r\n20201119T200316Z\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - Policy\"\r\n\r\nCnsKCSJleHBpcmF0aW9uIjogIjIwMjAtMTEtMTlUMjA6MDM6MTZaIiwKCSJjb25kaXRpb25zIjogWwoJCXsiYnVja2V0IjogInB1Ym51Yi1tbmVtb3N5bmUtZmlsZXMtZXUtY2VudHJhbC0xLXByZCJ9LAoJCVsiZXEiLCAiJHRhZ2dpbmciLCAiPFRhZ2dpbmc+PFRhZ1NldD48VGFnPjxLZXk+T2JqZWN0VFRMSW5EYXlzPC9LZXk+PFZhbHVlPjE8L1ZhbHVlPjwvVGFnPjwvVGFnU2V0PjwvVGFnZ2luZz4iXSwKCQlbImVxIiwgIiRrZXkiLCAic3ViLWMtYzg4MjQyZmEtMTNhZS0xMWViLWJjMzQtY2U2ZmQ5NjdhZjk1L2YtdElBY05YSk85bTgxZldWVl9vLWZTUS12ZXVwTnJUbG9WQVVQYmVVUVEvNjI4NDMwMzctN2E1YS00ZDI4LWFjYTYtOTJmZWQ5NTIwY2M2L2tpbmdfYXJ0aHVyLnR4dCJdLAoJCVsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCA1MjQyODgwXSwKCQlbInN0YXJ0cy13aXRoIiwgIiRDb250ZW50LVR5cGUiLCAiIl0sCgkJeyJ4LWFtei1jcmVkZW50aWFsIjogIkFLSUFZN0FVNkdRRDVLV0JTM0ZHLzIwMjAxMTE5L2V1LWNlbnRyYWwtMS9zMy9hd3M0X3JlcXVlc3QifSwKCQl7IngtYW16LXNlY3VyaXR5LXRva2VuIjogIiJ9LAoJCXsieC1hbXotYWxnb3JpdGhtIjogIkFXUzQtSE1BQy1TSEEyNTYifSwKCQl7IngtYW16LWRhdGUiOiAiMjAyMDExMTlUMjAwMzE2WiIgfQoJXQp9Cg==\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - X-Amz-Signature\"\r\n\r\n8866163a922d46d3f09046eba440e091af1257b6d01caec8bd7777f394992c99\r\ - \n--9a2cc9a17c70417a691d5d50320d1a2b\r\nContent-Disposition: form-data; name=\"\ - file\"; filename=\"king_arthur.txt\"\r\n\r\nKnights who say Ni!\r\n--9a2cc9a17c70417a691d5d50320d1a2b--\r\ - \n" - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2314' - Content-Type: - - multipart/form-data; boundary=9a2cc9a17c70417a691d5d50320d1a2b - User-Agent: - - PubNub-Python/4.6.1 - method: POST - uri: https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/ - response: - body: - string: '' - headers: - Date: - - Thu, 19 Nov 2020 20:02:17 GMT - ETag: - - '"3676cdb7a927db43c846070c4e7606c7"' - Location: - - https://pubnub-mnemosyne-files-eu-central-1-prd.s3.amazonaws.com/sub-c-mock-key%2Ff-tIAcNXJO9m81fWVV_o-fSQ-veupNrTloVAUPbeUQQ%2F62843037-7a5a-4d28-aca6-92fed9520cc6%2Fking_arthur.txt - Server: - - AmazonS3 - x-amz-expiration: - - expiry-date="Sat, 21 Nov 2020 00:00:00 GMT", rule-id="Archive file 1 day after - creation" - x-amz-id-2: - - ni/6kQFsLQrXV0wa1UpVrO2jbhDDngMdCBnFrO0AyYpVxI6ygUg0H3qdM3cPCWeLtSUCFoDzKqg= - x-amz-request-id: - - B88BF0CCE2F534B9 - x-amz-server-side-encryption: - - AES256 - status: - code: 204 - message: No Content -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - PubNub-Python/4.6.1 - method: GET - uri: https://ps.pndsn.com/v1/files/publish-file/pub-c-mock-key/sub-c-mock-key/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test_message%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%2262843037-7a5a-4d28-aca6-92fed9520cc6%22%2C%20%22name%22%3A%20%22king_arthur.txt%22%7D%7D?meta=null&ptto=16057799474000000&store=1&ttl=222&uuid=files_native_sync_uuid - response: - body: - string: '[1,"Sent","16057799474000000"]' - headers: - Access-Control-Allow-Methods: - - GET - Access-Control-Allow-Origin: - - '*' - Cache-Control: - - no-cache - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - text/javascript; charset="UTF-8" - Date: - - Thu, 19 Nov 2020 20:02:17 GMT - status: - code: 200 - message: OK -version: 1 diff --git a/tests/integrational/fixtures/native_sync/file_upload/test_publish_file_with_custom_type.json b/tests/integrational/fixtures/native_sync/file_upload/test_publish_file_with_custom_type.json index d884be54..d12949f1 100644 --- a/tests/integrational/fixtures/native_sync/file_upload/test_publish_file_with_custom_type.json +++ b/tests/integrational/fixtures/native_sync/file_upload/test_publish_file_with_custom_type.json @@ -5,19 +5,22 @@ "request": { "method": "GET", "uri": "https://ps.pndsn.com/v1/files/publish-file/{PN_KEY_PUBLISH}/{PN_KEY_SUBSCRIBE}/0/files_native_sync_ch/0/%7B%22message%22%3A%20%7B%22test%22%3A%20%22test%22%7D%2C%20%22file%22%3A%20%7B%22id%22%3A%20%222222%22%2C%20%22name%22%3A%20%22test%22%7D%7D?custom_message_type=test_message&meta=%7B%7D&store=0&ttl=0&uuid=uuid-mock", - "body": null, + "body": "", "headers": { - "User-Agent": [ - "PubNub-Python/9.0.0" + "host": [ + "ps.pndsn.com" ], - "Accept-Encoding": [ - "gzip, deflate" - ], - "Accept": [ + "accept": [ "*/*" ], - "Connection": [ + "accept-encoding": [ + "gzip, deflate" + ], + "connection": [ "keep-alive" + ], + "user-agent": [ + "PubNub-Python/9.1.0" ] } }, @@ -27,30 +30,33 @@ "message": "OK" }, "headers": { - "Cache-Control": [ - "no-cache" - ], - "Access-Control-Allow-Methods": [ - "GET" - ], "Date": [ - "Mon, 21 Oct 2024 08:19:49 GMT" + "Fri, 06 Dec 2024 23:08:26 GMT" ], "Content-Type": [ "text/javascript; charset=\"UTF-8\"" ], + "Content-Length": [ + "30" + ], "Connection": [ "keep-alive" ], - "Content-Length": [ - "30" + "Cache-Control": [ + "no-cache" + ], + "Access-Control-Allow-Methods": [ + "GET" + ], + "Access-Control-Allow-Credentials": [ + "true" ], - "Access-Control-Allow-Origin": [ + "Access-Control-Expose-Headers": [ "*" ] }, "body": { - "string": "[1,\"Sent\",\"17294987898141374\"]" + "string": "[1,\"Sent\",\"17335265062074045\"]" } } } diff --git a/tests/integrational/fixtures/native_sync/history/not_permitted.yaml b/tests/integrational/fixtures/native_sync/history/not_permitted.yaml deleted file mode 100644 index d17c50b2..00000000 --- a/tests/integrational/fixtures/native_sync/history/not_permitted.yaml +++ /dev/null @@ -1,25 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - User-Agent: [PubNub-Python/4.0.4] - method: GET - uri: https://ps.pndsn.com/v2/history/sub-key/sub-c-7ba2ac4c-4836-11e6-85a4-0619f8945a4f/channel/history-native-sync-ch?count=5&signature=DFG6A6mYSj-s8dj3w_cQNBJdMCPCYeHLpiAgeIbCb-g%3D×tamp=1482099937 - response: - body: {string: '[[],0,0]'} - headers: - Accept-Ranges: [bytes] - Access-Control-Allow-Methods: [GET] - Access-Control-Allow-Origin: ['*'] - Age: ['0'] - Cache-Control: [no-cache] - Connection: [keep-alive] - Content-Length: ['8'] - Content-Type: [text/javascript; charset="UTF-8"] - Date: ['Sun, 18 Dec 2016 22:25:37 GMT'] - Server: [Pubnub] - status: {code: 200, message: OK} -version: 1 diff --git a/tests/integrational/native_sync/test_file_upload.py b/tests/integrational/native_sync/test_file_upload.py index 19f8fedf..620e0ad9 100644 --- a/tests/integrational/native_sync/test_file_upload.py +++ b/tests/integrational/native_sync/test_file_upload.py @@ -6,8 +6,8 @@ from unittest.mock import patch from pubnub.exceptions import PubNubException from pubnub.pubnub import PubNub -from tests.integrational.vcr_helper import pn_vcr, pn_vcr_with_empty_body_request -from tests.helper import pnconf_file_copy, pnconf_enc_env_copy, pnconf_env_copy +from tests.integrational.vcr_helper import pn_vcr # , pn_vcr_with_empty_body_request +from tests.helper import pnconf_env_copy, pnconf_enc_env_copy, pnconf_env_copy from pubnub.endpoints.file_operations.publish_file_message import PublishFileMessage from pubnub.models.consumer.file import ( PNSendFileResult, PNGetFilesResult, PNDownloadFileResult, @@ -17,13 +17,15 @@ CHANNEL = "files_native_sync_ch" -pubnub = PubNub(pnconf_file_copy()) +pubnub = PubNub(pnconf_env_copy(disable_config_locking=True)) pubnub.config.uuid = "files_native_sync_uuid" def send_file(file_for_upload, cipher_key=None, pass_binary=False, timetoken_override=None, pubnub_instance=None): if not pubnub_instance: pubnub_instance = pubnub + if cipher_key: + pubnub_instance.config.cipher_key = cipher_key with open(file_for_upload.strpath, "rb") as fd: if pass_binary: @@ -35,8 +37,7 @@ def send_file(file_for_upload, cipher_key=None, pass_binary=False, timetoken_ove .message({"test_message": "test"}) \ .should_store(True) \ .ttl(222) \ - .file_object(fd) \ - .cipher_key(cipher_key) + .file_object(fd) if timetoken_override: send_file_endpoint = send_file_endpoint.ptto(timetoken_override) @@ -50,22 +51,34 @@ def send_file(file_for_upload, cipher_key=None, pass_binary=False, timetoken_ove return envelope -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/list_files.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/delete_all_files.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) +def test_delete_all_files(file_upload_test_data): + envelope = pubnub.list_files().channel(CHANNEL).sync() + files = envelope.result.data + for i in range(len(files) - 1): + file = files[i] + pubnub.delete_file().channel(CHANNEL).file_id(file["id"]).file_name(file["name"]).sync() + + +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/list_files.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_list_files(file_upload_test_data): envelope = pubnub.list_files().channel(CHANNEL).sync() assert isinstance(envelope.result, PNGetFilesResult) - assert envelope.result.count == 9 - assert file_upload_test_data["UPLOADED_FILENAME"] == envelope.result.data[8]["name"] + assert envelope.result.count == 1 + assert file_upload_test_data["UPLOADED_FILENAME"] == envelope.result.data[0]["name"] -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/download_file.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/download_file.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_send_and_download_file_using_bytes_object(file_for_upload, file_upload_test_data): envelope = send_file(file_for_upload, pass_binary=True) @@ -79,10 +92,10 @@ def test_send_and_download_file_using_bytes_object(file_for_upload, file_upload_ assert data == bytes(file_upload_test_data["FILE_CONTENT"], "utf-8") -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/download_file_encrypted.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_send_and_download_encrypted_file(file_for_upload, file_upload_test_data): cipher_key = "silly_walk" with patch("pubnub.crypto.PubNubCryptodome.get_initialization_vector", return_value="knightsofni12345"): @@ -91,18 +104,17 @@ def test_send_and_download_encrypted_file(file_for_upload, file_upload_test_data download_envelope = pubnub.download_file() \ .channel(CHANNEL) \ .file_id(envelope.result.file_id) \ - .file_name(envelope.result.name) \ - .cipher_key(cipher_key).sync() + .file_name(envelope.result.name).sync() assert isinstance(download_envelope.result, PNDownloadFileResult) data = download_envelope.result.data assert data == bytes(file_upload_test_data["FILE_CONTENT"], "utf-8") -@pn_vcr_with_empty_body_request.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr_with_empty_body_request.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/file_size_exceeded_maximum_size.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# # ) def test_file_exceeded_maximum_size(file_for_upload_10mb_size): with pytest.raises(PubNubException) as exception: send_file(file_for_upload_10mb_size) @@ -110,10 +122,10 @@ def test_file_exceeded_maximum_size(file_for_upload_10mb_size): assert "Your proposed upload exceeds the maximum allowed size" in str(exception.value) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/delete_file.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/delete_file.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_delete_file(file_for_upload): envelope = send_file(file_for_upload) @@ -125,10 +137,10 @@ def test_delete_file(file_for_upload): assert isinstance(delete_envelope.result, PNDeleteFileResult) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/download_url.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/download_url.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_get_file_url(file_for_upload): envelope = send_file(file_for_upload) @@ -138,14 +150,15 @@ def test_get_file_url(file_for_upload): .file_name(envelope.result.name).sync() assert isinstance(file_url_envelope.result, PNGetFileDownloadURLResult) + assert file_url_envelope.result.file_url is not None -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/download_url_check_auth_key_in_url.json", +# filter_query_parameters=('pnsdk',), serializer="pn_json", +# ) def test_get_file_url_has_auth_key_in_url_and_signature(file_upload_test_data): - pubnub = PubNub(pnconf_file_copy()) + pubnub = PubNub(pnconf_env_copy()) pubnub.config.uuid = "files_native_sync_uuid" pubnub.config.auth_key = "test_auth_key" @@ -157,10 +170,10 @@ def test_get_file_url_has_auth_key_in_url_and_signature(file_upload_test_data): assert "auth=test_auth_key" in str(file_url_envelope.status.client_request.url) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/fetch_file_upload_data.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_fetch_file_upload_s3_data(file_upload_test_data): envelope = pubnub._fetch_file_upload_s3_data() \ .channel(CHANNEL) \ @@ -169,10 +182,10 @@ def test_fetch_file_upload_s3_data(file_upload_test_data): assert isinstance(envelope.result, PNFetchFileUploadS3DataResult) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/publish_file_message.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/publish_file_message.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_publish_file_message(): envelope = PublishFileMessage(pubnub) \ .channel(CHANNEL) \ @@ -186,10 +199,10 @@ def test_publish_file_message(): assert isinstance(envelope.result, PNPublishFileMessageResult) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/publish_file_message_encrypted.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_publish_file_message_with_encryption(): envelope = PublishFileMessage(pubnub) \ .channel(CHANNEL) \ @@ -203,10 +216,10 @@ def test_publish_file_message_with_encryption(): assert isinstance(envelope.result, PNPublishFileMessageResult) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/publish_file_message_with_ptto.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_publish_file_message_with_overriding_time_token(): timetoken_to_override = 16057799474000000 envelope = PublishFileMessage(pubnub) \ @@ -225,43 +238,44 @@ def test_publish_file_message_with_overriding_time_token(): assert "ptto" in urllib.parse.parse_qs(envelope.status.client_request.url.query.decode()) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.yaml", - filter_query_parameters=('pnsdk',) -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/send_file_with_ptto.json", serializer="pn_json", +# filter_query_parameters=('pnsdk',) +# ) def test_send_file_with_timetoken_override(file_for_upload): send_file(file_for_upload, pass_binary=True, timetoken_override=16057799474000000) -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json", - filter_query_parameters=('pnsdk',), serializer='pn_json' -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/send_and_download_gcm_encrypted_file.json", +# filter_query_parameters=('pnsdk',), serializer='pn_json' +# ) def test_send_and_download_gcm_encrypted_file(file_for_upload, file_upload_test_data): + cipher_key = "silly_walk" + config = pnconf_enc_env_copy() config.cipher_mode = AES.MODE_GCM config.fallback_cipher_mode = AES.MODE_CBC + config.cipher_key = cipher_key pubnub = PubNub(config) - cipher_key = "silly_walk" with patch("pubnub.crypto.PubNubCryptodome.get_initialization_vector", return_value="knightsofni12345"): envelope = send_file(file_for_upload, cipher_key=cipher_key, pubnub_instance=pubnub) download_envelope = pubnub.download_file() \ .channel(CHANNEL) \ .file_id(envelope.result.file_id) \ - .file_name(envelope.result.name) \ - .cipher_key(cipher_key).sync() + .file_name(envelope.result.name).sync() assert isinstance(download_envelope.result, PNDownloadFileResult) data = download_envelope.result.data assert data == bytes(file_upload_test_data["FILE_CONTENT"], "utf-8") -@pn_vcr.use_cassette( - "tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json", - filter_query_parameters=('pnsdk',), serializer='pn_json' -) +# @pn_vcr.use_cassette( +# "tests/integrational/fixtures/native_sync/file_upload/send_and_download_encrypted_file_fallback_decode.json", +# filter_query_parameters=('pnsdk',), serializer='pn_json' +# ) def test_send_and_download_encrypted_file_fallback_decode(file_for_upload, file_upload_test_data): config_cbc = pnconf_enc_env_copy() pn_cbc = PubNub(config_cbc) diff --git a/tests/integrational/native_sync/test_history.py b/tests/integrational/native_sync/test_history.py index 335aaf85..c917f23a 100644 --- a/tests/integrational/native_sync/test_history.py +++ b/tests/integrational/native_sync/test_history.py @@ -10,7 +10,8 @@ from pubnub.models.consumer.history import PNHistoryResult from pubnub.models.consumer.pubsub import PNPublishResult from pubnub.pubnub import PubNub -from tests.helper import pnconf_copy, pnconf_enc_copy, pnconf_enc_env_copy, pnconf_env_copy, pnconf_pam_copy +from tests.helper import pnconf_copy, pnconf_enc_copy, pnconf_enc_env_copy, pnconf_env_copy, pnconf_pam_copy, \ + pnconf_pam_stub_copy from tests.integrational.vcr_helper import use_cassette_and_stub_time_sleep_native pubnub.set_stream_logger('pubnub', logging.DEBUG) @@ -76,11 +77,9 @@ def test_encrypted(self, crypto_mock): assert envelope.result.messages[3].entry == 'hey-3' assert envelope.result.messages[4].entry == 'hey-4' - @use_cassette_and_stub_time_sleep_native('tests/integrational/fixtures/native_sync/history/not_permitted.yaml', - filter_query_parameters=['uuid', 'pnsdk']) def test_not_permitted(self): ch = "history-native-sync-ch" - pubnub = PubNub(pnconf_pam_copy()) + pubnub = PubNub(pnconf_pam_stub_copy(non_subscribe_request_timeout=1)) pubnub.config.uuid = "history-native-sync-uuid" with pytest.raises(PubNubException): diff --git a/tests/integrational/native_sync/test_state.py b/tests/integrational/native_sync/test_state.py index d17b196d..4de5f036 100644 --- a/tests/integrational/native_sync/test_state.py +++ b/tests/integrational/native_sync/test_state.py @@ -4,7 +4,7 @@ import pubnub from pubnub.models.consumer.presence import PNSetStateResult, PNGetStateResult from pubnub.pubnub import PubNub -from tests.helper import pnconf_copy, pnconf_pam_copy +from tests.helper import pnconf_copy, pnconf_pam_env_copy from tests.integrational.vcr_helper import pn_vcr pubnub.set_stream_logger('pubnub', logging.DEBUG) @@ -57,9 +57,9 @@ def test_multiple_channels(self): def test_super_call(self): ch1 = "state-tornado-ch1" ch2 = "state-tornado-ch2" - pnconf = pnconf_pam_copy() + pnconf = pnconf_pam_env_copy() pubnub = PubNub(pnconf) - pubnub.config.uuid = 'test-state-native-uuid-|.*$' + pubnub.config.uuid = 'test-state-native-' state = {"name": "Alex", "count": 5} env = pubnub.set_state() \ diff --git a/tests/integrational/vcr_helper.py b/tests/integrational/vcr_helper.py index 3ef13a5b..57f57163 100644 --- a/tests/integrational/vcr_helper.py +++ b/tests/integrational/vcr_helper.py @@ -197,6 +197,8 @@ def check_the_difference_matcher(r1, r2): pn_vcr.register_matcher('string_list_in_query', string_list_in_query_matcher) pn_vcr.register_serializer('pn_json', PNSerializer()) +pn_vcr_with_empty_body_request.register_serializer('pn_json', PNSerializer()) + def use_cassette_and_stub_time_sleep_native(cassette_name, **kwargs): context = pn_vcr.use_cassette(cassette_name, **kwargs) diff --git a/tests/integrational/vcr_serializer.py b/tests/integrational/vcr_serializer.py index 00ae4fd1..e998a107 100644 --- a/tests/integrational/vcr_serializer.py +++ b/tests/integrational/vcr_serializer.py @@ -2,7 +2,6 @@ import re from base64 import b64decode, b64encode from vcr.serializers.jsonserializer import serialize, deserialize -from pickle import dumps, loads class PNSerializer: @@ -30,9 +29,6 @@ def serialize(self, cassette_dict): if type(interaction['response']['body']['string']) is bytes: ascii_body = b64encode(interaction['response']['body']['string']).decode('ascii') interaction['response']['body'] = {'binary': ascii_body} - if interaction['request']['body']: - ascii_body = b64encode(dumps(interaction['request']['body'])).decode('ascii') - interaction['request']['body'] = {'pickle': ascii_body} return self.replace_keys(serialize(cassette_dict)) @@ -44,8 +40,9 @@ def replace_placeholders(self, cassette_string): def deserialize(self, cassette_string): cassette_dict = deserialize(self.replace_placeholders(cassette_string)) for index, interaction in enumerate(cassette_dict['interactions']): - if isinstance(interaction['request']['body'], dict) and 'pickle' in interaction['request']['body'].keys(): - interaction['request']['body'] = loads(b64decode(interaction['request']['body']['pickle'])) + if isinstance(interaction['request']['body'], dict) and 'binary' in interaction['request']['body'].keys(): + interaction['request']['body']['string'] = b64decode(interaction['request']['body']['binary']) + del interaction['request']['body']['binary'] if 'binary' in interaction['response']['body'].keys(): interaction['response']['body']['string'] = b64decode(interaction['response']['body']['binary']) del interaction['response']['body']['binary'] diff --git a/tests/pytest.ini b/tests/pytest.ini index 3d66fe5b..4b96538c 100644 --- a/tests/pytest.ini +++ b/tests/pytest.ini @@ -1,5 +1,7 @@ [pytest] filterwarnings = ignore:Mutable config will be deprecated in the future.:DeprecationWarning + ignore:Access management v2 is being deprecated.:DeprecationWarning + ignore:.*Usage of local cipher_keys is discouraged.*:UserWarning asyncio_default_fixture_loop_scope = module \ No newline at end of file