def test_startswith_handler_check_negative_match_with_case_sensitive(): message = type('Message', (), {'text': 'pong'}) handler = handlers.StartswithHandler(pattern='hello', case_sensitive=False) assert not handler.check(message)
def test_startswith_handler_check_negative_match(): message = type('Message', (), {'text': 'Ping'}) handler = handlers.StartswithHandler(pattern='hello my friend') assert not handler.check(message)
def test_startswith_handler_check_with_case_sensitive(): message = type('Message', (), {'text': 'Hello my friend'}) handler = handlers.StartswithHandler(pattern='hello', case_sensitive=False) assert handler.check(message)
def test_startswith_handler_check(): message = type('Message', (), {'text': 'hello my friend'}) handler = handlers.StartswithHandler(pattern='hello') assert handler.check(message)
def test_startswith_handler_check_negative_match_with_case_sensitive(message): message.text = 'pong' handler = handlers.StartswithHandler(pattern='hello', case_sensitive=False) assert not handler.check(message)
def test_startswith_handler_check_with_case_sensitive(message): message.text = 'hello my friend' handler = handlers.StartswithHandler(pattern='hello', case_sensitive=False) assert handler.check(message)
def test_startswith_handler_check_negative_match(message): message.text = 'Ping' handler = handlers.StartswithHandler(pattern='hello my friend') assert not handler.check(message)
def test_startswith_handler_check(message): message.text = 'hello my friend' handler = handlers.StartswithHandler(pattern='hello') assert handler.check(message)