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 88
99SDK_VERSION = '0.10.0'
1010INTEREST_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])*$' )
1212MAX_NUMBER_OF_INTERESTS = 100
1313
1414
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):
291291 'INSTANCE_ID' ,
292292 'SECRET_KEY'
293293 )
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+
294307 with self .assertRaises (ValueError ) as e :
295308 pn_client .publish (
296309 interests = ['bad|interest' ],
You can’t perform that action at this time.
0 commit comments