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
def test_contains_space(self): """False when contains space.""" assert is_channel('#contains space') is False
def test_contains_comma(self): """False when contains comma.""" assert is_channel('#contains,comma') is False
def test_50_chars(self): """True when up to 50 chars.""" channel = '#' + 49 * 'a' assert is_channel(channel) is True
def test_51_chars(self): """False when 51 chars or more.""" channel = '#' + 50 * 'a' assert is_channel(channel) is False
def test_starts_with_alpha_char(self): """False when starts with a normal char.""" assert is_channel('channel') is False
def test_starts_with_plus(self): """True when starts with a + ("plus" AKA "add").""" assert is_channel('+channel') is True
def test_starts_with_hash(self): """True when starts with a # ("hash" AKA "pound").""" assert is_channel('#channel') is True
def test_starts_with_exclamtion_mark(self): """True when starts with an ! ("exclamation mark" AKA "bang").""" assert is_channel('!channel') is True
def test_starts_with_ampersand(self): """True when starts with an & ("ampersand").""" assert is_channel('&channel') is True