Beispiel #1
0
    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)
Beispiel #2
0
 def test_pokemon(self):
     response = reply({
         'text': 'Which Pokemon is #1',
         'user': {
             'screen_name': 'TestUser'
         }
     })
     self.assertTrue("Bulbasaur" in response)
Beispiel #3
0
 def test_text1(self):
     response = reply({
         'text': '@bob_der_bot 1+1',
         'user': {
             'screen_name': 'TestUser'
         }
     })
     self.assertTrue("2" in response)
Beispiel #4
0
 def test_math1(self):
     response = reply({'text': '1+1', 'user': {'screen_name': 'TestUser'}})
     self.assertTrue("2" in response)
Beispiel #5
0
 def reply_to(self, tweet):
     return reply({'text': tweet, 'user': {'screen_name': 'TestUser'}})
Beispiel #6
0
 def test_split(self):
     response = reply({'text': '1+2', 'user': {'screen_name': 'TestUser'}})
     self.assertTrue("3" in response)