Beispiel #1
0
 def test_contains_bel(self):
     """False when contains ASCII BEL control char."""
     # "\7" is one way python can escape the ASCII BEL char.
     assert is_channel('#contains\7BEL') is False
Beispiel #2
0
 def test_contains_space(self):
     """False when contains space."""
     assert is_channel('#contains space') is False
Beispiel #3
0
 def test_contains_comma(self):
     """False when contains comma."""
     assert is_channel('#contains,comma') is False
Beispiel #4
0
 def test_50_chars(self):
     """True when up to 50 chars."""
     channel = '#' + 49 * 'a'
     assert is_channel(channel) is True
Beispiel #5
0
 def test_51_chars(self):
     """False when 51 chars or more."""
     channel = '#' + 50 * 'a'
     assert is_channel(channel) is False
Beispiel #6
0
 def test_starts_with_alpha_char(self):
     """False when starts with a normal char."""
     assert is_channel('channel') is False
Beispiel #7
0
 def test_starts_with_plus(self):
     """True when starts with a + ("plus" AKA "add")."""
     assert is_channel('+channel') is True
Beispiel #8
0
 def test_starts_with_hash(self):
     """True when starts with a # ("hash" AKA "pound")."""
     assert is_channel('#channel') is True
Beispiel #9
0
 def test_starts_with_exclamtion_mark(self):
     """True when starts with an ! ("exclamation mark" AKA "bang")."""
     assert is_channel('!channel') is True
Beispiel #10
0
 def test_starts_with_ampersand(self):
     """True when starts with an & ("ampersand")."""
     assert is_channel('&channel') is True