Skip to content

Commit 53aa966

Browse files
committed
PR Fixes
1 parent ad0bebe commit 53aa966

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

firebase_admin/_messaging_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def encode_light_settings(cls, light_settings):
392392

393393
if not re.match(r'^#[0-9a-fA-F]{6}$', color) and not re.match(r'^#[0-9a-fA-F]{8}$', color):
394394
raise ValueError(
395-
'LightSettings.color must be in the form #aabbcc or aabbccdd.')
395+
'LightSettings.color must be in the form #RRGGBB or #RRGGBBAA.')
396396
if len(color) == 7:
397397
color = (color+'FF')
398398
rgba = [int(color[i:i + 2], 16) / 255. for i in (1, 3, 5, 7)]

firebase_admin/_messaging_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class AndroidNotification(object):
9090
in ``title_loc_key`` (optional).
9191
channel_id: channel_id of the notification (optional).
9292
image: Image url of the notification (optional).
93-
ticker: Sets the "ticker" text, which is sent to accessibility services. Prior to API
93+
ticker: Sets the ``ticker`` text, which is sent to accessibility services. Prior to API
9494
level 21 (Lollipop), sets the text that is displayed in the status bar when the
9595
notification first arrives (optional).
9696
sticky: When set to ``false`` or unset, the notification is automatically dismissed when the

tests/test_messaging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,8 @@ def test_invalid_color(self, data):
682682
light_off_duration_millis=200)
683683
excinfo = self._check_light_settings(notification)
684684
if isinstance(data, six.string_types):
685-
assert str(excinfo.value) == ('LightSettings.color must be in the form #aabbcc or '
686-
'aabbccdd.')
685+
assert str(excinfo.value) == ('LightSettings.color must be in the form #RRGGBB or '
686+
'#RRGGBBAA.')
687687
else:
688688
assert str(
689689
excinfo.value) == 'LightSettings.color must be a non-empty string.'

0 commit comments

Comments
 (0)