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 @@ -291,6 +291,19 @@ def test_publish_should_fail_if_interest_contains_invalid_chars(self):
291
291
'INSTANCE_ID' ,
292
292
'SECRET_KEY'
293
293
)
294
+ with self .assertRaises (ValueError ) as e :
295
+ pn_client .publish (
296
+ interests = ['bad:interest' ],
297
+ publish_body = {
298
+ 'apns' : {
299
+ 'aps' : {
300
+ 'alert' : 'Hello World!' ,
301
+ },
302
+ },
303
+ },
304
+ )
305
+ self .assertIn ('"bad:interest" contains a forbidden character' , str (e .exception ))
306
+
294
307
with self .assertRaises (ValueError ) as e :
295
308
pn_client .publish (
296
309
interests = ['bad|interest' ],
You can’t perform that action at this time.
0 commit comments