File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
pusher_push_notifications Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
SDK_VERSION = '0.10.0'
10
10
INTEREST_MAX_LENGTH = 164
11
- INTEREST_REGEX = re .compile ('^(_|-|=|@|,|\\ .|: |[A-Z]|[a-z]|[0-9])*$' )
11
+ INTEREST_REGEX = re .compile ('^(_|-|=|@|,|\\ .|; |[A-Z]|[a-z]|[0-9])*$' )
12
12
MAX_NUMBER_OF_INTERESTS = 100
13
13
14
14
Original file line number Diff line number Diff line change @@ -275,6 +275,19 @@ def test_publish_should_fail_if_interest_contains_invalid_chars(self):
275
275
'INSTANCE_ID' ,
276
276
'SECRET_KEY'
277
277
)
278
+ with self .assertRaises (ValueError ) as e :
279
+ pn_client .publish (
280
+ interests = ['bad:interest' ],
281
+ publish_body = {
282
+ 'apns' : {
283
+ 'aps' : {
284
+ 'alert' : 'Hello World!' ,
285
+ },
286
+ },
287
+ },
288
+ )
289
+ self .assertIn ('"bad:interest" contains a forbidden character' , str (e .exception ))
290
+
278
291
with self .assertRaises (ValueError ) as e :
279
292
pn_client .publish (
280
293
interests = ['bad|interest' ],
You can’t perform that action at this time.
0 commit comments