File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,14 @@ def test_validate_channel(self):
2828 pusher .util .validate_channel (invalid_channel )
2929
3030 def test_validate_server_to_user_channel (self ):
31+ self .assertEqual ("#server-to-user-123" , pusher .util .validate_channel ("#server-to-user-123" ))
32+ self .assertEqual ("#server-to-user-user123" , pusher .util .validate_channel ("#server-to-user-user123" ))
33+ self .assertEqual ("#server-to-user-ID-123" , pusher .util .validate_channel ("#server-to-user-ID-123" ))
3134
32- valid_server_to_user_channel = "#server-to-user-123"
33- invalid_server_to_user_channel = "#server-to-useR-123"
34- valid_server_to_users = "#server-to-users"
35- valid_server_to_user1234 = "#server-to-user1234"
36-
37- self .assertEqual (valid_server_to_user_channel , pusher .util .validate_channel (valid_server_to_user_channel ))
38- self .assertEqual (valid_server_to_users , pusher .util .validate_channel (valid_server_to_users ))
39- self .assertEqual (valid_server_to_user1234 , pusher .util .validate_channel (valid_server_to_user1234 ))
4035 with self .assertRaises (ValueError ):
41- pusher .util .validate_channel (invalid_server_to_user_channel )
36+ pusher .util .validate_channel ("#server-to-useR-123" )
37+ pusher .util .validate_channel ("#server-to-user1234" )
38+ pusher .util .validate_channel ("#server-to-users" )
4239
4340
4441if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments