-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fixes to user authentication and send a message to a specific one
- Loading branch information
1 parent
8f394fc
commit 6242ea7
Showing
6 changed files
with
15 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,8 @@ def test_validate_user_id(self): | |
|
||
def test_validate_channel(self): | ||
valid_channels = ["123", "xyz", "xyz123", "xyz_123", "xyz-123", "Channel@123", "channel_xyz", "channel-xyz", | ||
"channel,456", "channel;asd", "[email protected],987;654"] | ||
"channel,456", "channel;asd", "[email protected],987;654", "#server-to-user1234", | ||
"#server-to-users"] | ||
|
||
invalid_channels = ["#123", "x" * 201, "abc%&*"] | ||
|
||
|
@@ -31,10 +32,13 @@ def test_validate_channel(self): | |
def test_validate_server_to_user_channel(self): | ||
|
||
valid_server_to_user_channel = "#server-to-user-123" | ||
|
||
invalid_server_to_user_channel = "#server-to-useR-123" | ||
valid_server_to_users = "#server-to-users" | ||
valid_server_to_user1234 = "#server-to-user1234" | ||
|
||
self.assertEqual(valid_server_to_user_channel, pusher.util.validate_channel(valid_server_to_user_channel)) | ||
self.assertEqual(valid_server_to_users, pusher.util.validate_channel(valid_server_to_users)) | ||
self.assertEqual(valid_server_to_user1234, pusher.util.validate_channel(valid_server_to_user1234)) | ||
with self.assertRaises(ValueError): | ||
pusher.util.validate_channel(invalid_server_to_user_channel) | ||
|
||
|