def test_math1(self): response = reply({'text': '1+1', 'user': {'screen_name': 'TestUser'}}) self.assertTrue("2" in response) response = reply({ 'text': '@bot 1+1', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("2" in response) response = reply({ 'text': 'Which Pokemon is #1', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("Bulbasaur" in response) response = reply({ 'text': 'Which Pokemon is #2', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("Ivysaur" in response) response = reply({ 'text': '@bot oh rly?', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("YA RLY!" in response)
def test_pokemon(self): response = reply({ 'text': 'Which Pokemon is #1', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("Bulbasaur" in response)
def test_text1(self): response = reply({ 'text': '@bob_der_bot 1+1', 'user': { 'screen_name': 'TestUser' } }) self.assertTrue("2" in response)
def test_math1(self): response = reply({'text': '1+1', 'user': {'screen_name': 'TestUser'}}) self.assertTrue("2" in response)
def reply_to(self, tweet): return reply({'text': tweet, 'user': {'screen_name': 'TestUser'}})
def test_split(self): response = reply({'text': '1+2', 'user': {'screen_name': 'TestUser'}}) self.assertTrue("3" in response)