8000 Revert "Added tests." · firebase/firebase-admin-python@1a1b3f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a1b3f0

Browse files
committed
Revert "Added tests."
This reverts commit 9288589.
1 parent 580d293 commit 1a1b3f0

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

tests/test_messaging.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
NON_OBJECT_ARGS = [list(), tuple(), dict(), 'foo', 0, 1, True, False]
3434
NON_LIST_ARGS = ['', tuple(), dict(), True, False, 1, 0, [1], ['foo', 1]]
3535
NON_UINT_ARGS = ['1.23s', list(), tuple(), dict(), -1.23]
36-
NON_BOOL_ARGS = ['', list(), tuple(), dict(), 1, 0, [1], ['foo', 1], {1: 'foo'}, {'foo': 1}]
3736
HTTP_ERROR_CODES = {
3837
400: exceptions.InvalidArgumentError,
3938
403: exceptions.PermissionDeniedError,
@@ -250,7 +249,7 @@ def test_fcm_options(self):
250249
topic='topic',
251250
fcm_options=messaging.FCMOptions('message-label'),
252 8000 251
android=messaging.AndroidConfig(
253-
fcm_options=messaging.AndroidFCMOptions('android-label', False)),
252+
fcm_options=messaging.AndroidFCMOptions('android-label')),
254253
apns=messaging.APNSConfig(fcm_options=
255254
messaging.APNSFCMOptions(
256255
analytics_label='apns-label',
@@ -260,8 +259,7 @@ def test_fcm_options(self):
260259
{
261260
'topic': 'topic',
262261
'fcm_options': {'analytics_label': 'message-label'},
263-
'android': {'fcm_options': {'analytics_label': 'android-label',
264-
'direct_boot_ok': False,}},
262+
'android': {'fcm_options': {'analytics_label': 'android-label'}},
265263
'apns': {'fcm_options': {'analytics_label': 'apns-label',
266264
'image': 'https://images.unsplash.com/photo-14944386399'
267265
'46-1ebd1d20bf85?fit=crop&w=900&q=60'}},
@@ -319,21 +317,6 @@ def test_invalid_data(self, data):
319317
check_encoding(messaging.Message(
320318
topic='topic', android=messaging.AndroidConfig(data=data)))
321319

322-
@pytest.mark.parametrize('data', NON_STRING_ARGS)
323-
def test_invalid_analytics_label(self, data):
324-
with pytest.raises(ValueError):
325-
check_encoding(messaging.Message(
326-
topic='topic', android=messaging.AndroidConfig(
327-
fcm_options=messaging.AndroidFCMOptions(analytics_label=data))))
328-
329-
@pytest.mark.parametrize('data', NON_BOOL_ARGS)
330-
def test_invalid_direct_boot_ok(self, data):
331-
with pytest.raises(ValueError):
332-
check_encoding(messaging.Message(
333-
topic='topic', android=messaging.AndroidConfig(
334-
fcm_options=messaging.AndroidFCMOptions(direct_boot_ok=data))))
335-
336-
337320
def test_android_config(self):
338321
msg = messaging.Message(
339322
topic='topic',
@@ -343,7 +326,7 @@ def test_android_config(self):
343326
priority='high',
344327
ttl=123,
345328
data={'k1': 'v1', 'k2': 'v2'},
346-
fcm_options=messaging.AndroidFCMOptions('analytics_label_v1', True)
329+
fcm_options=messaging.AndroidFCMOptions('analytics_label_v1')
347330
)
348331
)
349332
expected = {
@@ -359,7 +342,6 @@ def test_android_config(self):
359342
},
360343
'fcm_options': {
361344
'analytics_label': 'analytics_label_v1',
362-
'direct_boot_ok': True,
363345
},
364346
},
365347
}

0 commit comments

Comments
 (0)
0