def test_text_contains_emoji(self): assert not text_contains_emoji("") assert not text_contains_emoji("test") assert not text_contains_emoji("lorem ipsum") assert text_contains_emoji("🏀") assert text_contains_emoji("🏀asd") assert text_contains_emoji("asd🏀") assert text_contains_emoji("🇫🇷")
def test_text_contains_emoji(self): assert not text_contains_emoji("") assert not text_contains_emoji("test") assert not text_contains_emoji("lorem ipsum") assert text_contains_emoji("🏀") assert text_contains_emoji("🏀asd") assert text_contains_emoji("asd🏀") assert text_contains_emoji("🇫🇷")
def corgi(): """Respond to incoming calls with a simple text message.""" text = request.values.get("Body") or "" if text_contains_emoji(text): return get_corgi(text) emoji = emojis_for_emoticons.get(text, None) if emoji: print(emoji) return get_corgi(emoji) message = render_template('txt/request_does_not_contain_emoji.txt') resp = twilio.twiml.Response() resp.message(message) return str(resp)
def corgi(): """Respond to incoming calls with a simple text message.""" text = request.values.get("Body") or "" if text_contains_emoji(text): return get_corgi(text) emoji = emojis_for_emoticons.get(text, None) if emoji: print(emoji) return get_corgi(emoji) message = render_template('txt/request_does_not_contain_emoji.txt') resp = twilio.twiml.Response() resp.message(message) return str(resp)