Skip to content

Commit

Permalink
Extend FCM v1 api tests to ensure apns settings are passed along
Browse files Browse the repository at this point in the history
  • Loading branch information
devonh committed Apr 17, 2024
1 parent 633da94 commit f44d578
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_gcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def _get_access_token(self) -> str:


class GcmTestCase(testutils.TestCase):
maxDiff = None
def config_setup(self, config: Dict[str, Any]) -> None:
config["apps"]["com.example.gcm"] = {
"type": "tests.test_gcm.TestGcmPushkin",
Expand All @@ -131,6 +132,17 @@ def config_setup(self, config: Dict[str, Any]) -> None:
"api_version": "v1",
"project_id": "example_project",
"service_account_file": "/path/to/file.json",
"fcm_options": {
"apns": {
"payload": {
"aps": {
"content-available": 1,
"mutable-content": 1,
"alert": ""
},
},
},
},
}

def get_test_pushkin(self, name: str) -> TestGcmPushkin:
Expand Down Expand Up @@ -231,6 +243,15 @@ def test_expected_api_v1(self) -> None:
"missed_calls": "1",
},
"android": {"priority": "high"},
"apns": {
"payload": {
"aps": {
"content-available": 1,
"mutable-content": 1,
"alert": ""
},
},
},
"token": "spqr",
}
},
Expand Down

0 comments on commit f44d578

Please sign in to comment.