From 39f8c177bcacb9d7d71eea7aef8f2c2bf42de0e4 Mon Sep 17 00:00:00 2001 From: James Bligh <618250+blighj@users.noreply.github.com> Date: Sun, 8 Oct 2023 04:15:56 +0100 Subject: [PATCH] Add WebPush support for Safari (#674) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add WebPush support for Safari * Update webpush.py based on review Declare results variable at the start of the block * Fix typo in warning Co-authored-by: Cuyler Stuwe * Update README.rst Co-authored-by: James Bligh <618250+blighj@users.noreply.github.com> * Fix mailto: space * Expanded documentation for Web Push (#558) • Added example code to register WP device • Fixed issue where call to extract UserAgent didn't include UA • Added examples on how to send a Web Push message * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Attempt to fix tests * Update README.rst --------- Co-authored-by: James Bligh Co-authored-by: Cuyler Stuwe Co-authored-by: Éloi Rivard Co-authored-by: Neil Littlejohns Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- setup.cfg | 1 - tests/test_rest_framework.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index dbf50936..99dfc8c8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,7 +37,6 @@ setup_requires = APNS = apns2>=0.3.0 importlib-metadata;python_version < "3.8" - pywebpush>=1.3.0 Django>=2.2 WP = pywebpush>=1.3.0 diff --git a/tests/test_rest_framework.py b/tests/test_rest_framework.py index 87235fb8..53e751ee 100644 --- a/tests/test_rest_framework.py +++ b/tests/test_rest_framework.py @@ -55,7 +55,7 @@ def test_validation(self): # valid data - 200 bytes mixed case serializer = APNSDeviceSerializer(data={ - "registration_id": "aE" * 200, + "registration_id": "aE" * 100, "name": "Apple iPhone 6+", "device_id": "ffffffffffffffffffffffffffffffff", })