7
7
def payload_alert ():
8
8
return PayloadAlert (
9
9
title = 'title' ,
10
- title_localized_key = 'loc_k' ,
11
- title_localized_args = ['loc_a' ],
10
+ title_localized_key = 'title_loc_k' ,
11
+ title_localized_args = ['title_loc_a' ],
12
+ subtitle = 'subtitle' ,
13
+ subtitle_localized_key = 'subtitle_loc_k' ,
14
+ subtitle_localized_args = ['subtitle_loc_a' ],
12
15
body = 'body' ,
13
16
body_localized_key = 'body_loc_k' ,
14
17
body_localized_args = ['body_loc_a' ],
@@ -21,8 +24,11 @@ def payload_alert():
21
24
def test_payload_alert (payload_alert ):
22
25
assert payload_alert .dict () == {
23
26
'title' : 'title' ,
24
- 'title-loc-key' : 'loc_k' ,
25
- 'title-loc-args' : ['loc_a' ],
27
+ 'title-loc-key' : 'title_loc_k' ,
28
+ 'title-loc-args' : ['title_loc_a' ],
29
+ 'subtitle' : 'subtitle' ,
30
+ 'subtitle-loc-key' : 'subtitle_loc_k' ,
31
+ 'subtitle-loc-args' : ['subtitle_loc_a' ],
26
32
'body' : 'body' ,
27
33
'loc-key' : 'body_loc_k' ,
28
34
'loc-args' : ['body_loc_a' ],
@@ -61,8 +67,11 @@ def test_payload_with_payload_alert(payload_alert):
61
67
'aps' : {
62
68
'alert' : {
63
69
'title' : 'title' ,
64
- 'title-loc-key' : 'loc_k' ,
65
- 'title-loc-args' : ['loc_a' ],
70
+ 'title-loc-key' : 'title_loc_k' ,
71
+ 'title-loc-args' : ['title_loc_a' ],
72
+ 'subtitle' : 'subtitle' ,
73
+ 'subtitle-loc-key' : 'subtitle_loc_k' ,
74
+ 'subtitle-loc-args' : ['subtitle_loc_a' ],
66
75
'body' : 'body' ,
67
76
'loc-key' : 'body_loc_k' ,
68
77
'loc-args' : ['body_loc_a' ],
0 commit comments