Skip to content

Commit 71d4901

Browse files
committed
cleanup
1 parent 15e9b83 commit 71d4901

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

.github/workflows/python-app.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
python -m black -t py310 --check .
4848
- name: Test with pytest
4949
run: |
50-
export FCM_TEST_API_KEY=AAA
5150
export FCM_TEST_PROJECT_ID=test
5251
pip install . ".[test]"
5352
python -m pytest .

tests/conftest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010

1111
@pytest.fixture(scope="module")
1212
def push_service():
13-
service_account = os.getenv("GOOGLE_APPLICATION_CREDENTIALS", "TEST")
13+
service_account_file = os.getenv("GOOGLE_APPLICATION_CREDENTIALS", None)
14+
project_id = os.getenv("FCM_TEST_PROJECT_ID", None)
1415
assert (
15-
service_account
16+
service_account_file
1617
), "Please set the service_account for testing according to CONTRIBUTING.rst"
1718

18-
return FCMNotification(service_account_file=service_account, project_id="TEST")
19+
return FCMNotification(
20+
service_account_file=service_account_file, project_id=project_id
21+
)
1922

2023

2124
@pytest.fixture

tests/test_fcm.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,3 @@ def test_notify(push_service, generate_response):
1919
)
2020

2121
assert isinstance(response, dict)
22-
23-
24-
def test_async_notify(push_service, mock_aiohttp_session):
25-
params = {
26-
"fcm_token": "test",
27-
"notification_title": "test",
28-
"notification_body": "test",
29-
"notification_image": "test",
30-
"data_payload": {"test": "test"},
31-
"topic_name": "test",
32-
"topic_condition": "test",
33-
"android_config": {},
34-
"apns_config": {},
35-
"webpush_config": {},
36-
"fcm_options": {},
37-
"dry_run": False,
38-
}
39-
40-
params_list = [params for _ in range(100)]
41-
42-
push_service.send_async_request(params_list, timeout=5)

0 commit comments

Comments
 (0)