Exemplo n.º 1
0
 def test_where_miller_keilbasa_found(self):
     self.fake_event.text = 'where miller kielbasa'
     expected_message = "Oh, its somewhere you don't wanna know.... :-;"
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (expected_message == x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 2
0
 def test_how_many_socks_found(self):
     self.fake_event.text = 'how many socks'
     expected_message = "Meekle uses"
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (expected_message in x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 3
0
 def test_when_palooza_found(self):
     self.fake_event.text = 'when palooza'
     expected_message = 'Toomie picked May 28!'
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (expected_message == x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 4
0
 def test_where_palooza_found(self):
     self.fake_event.text = 'where palooza'
     expected_message = "I believe it is Miller's turn to pick"
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (expected_message == x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 5
0
 def test_when_aoe(self):
     self.fake_event.text = 'when aoe'
     expected_messages = ["8pm", "9pm", "10pm", "now"]
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (x in expected_messages):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 6
0
 def test_how_many_kielbasa_found(self):
     self.fake_event.text = 'how many kielbasa'
     expected_message = "Miller scarfs down"
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (expected_message in x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 7
0
 def test_merkle_found(self):
     self.fake_event.text = 'joeyfluff'
     self.fake_event.user.full_name = 'merklepants'
     merkle_message = "YOU SAID THE SECRET WORDDDDDD {}!!!".format(
         self.fake_event.user.full_name)
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (merkle_message == x):
             self.message_found = True
     self.assertTrue(self.message_found)
Exemplo n.º 8
0
    def test_tom_bomb_found(self):

        bomb_message = 'Gary actually made the tom bomb. 💩💩💩💩💩💩💩💩💩💩💩💩💩💩💩'
        self.fake_event.text = 'tom bomb'
        for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                             'nocommand'):
            print(x)
            if (bomb_message == x):
                self.message_found = True
        self.assertTrue(self.message_found)
Exemplo n.º 9
0
 def test_joeyboy_found(self, mock_open, mock_range):
     mock_range.return_value = 0
     self.fake_event.text = '!joeyboy'
     expected_messages = ["Joeyboy loves things!", "Joeyboy eats veggies!"]
     mock_open.side_effect = [
         mock.mock_open(read_data="Joeyboy eats veggies!").return_value,
         mock.mock_open(read_data="Joeyboy loves things!").return_value
     ]
     for x in monitorwords._got_a_message(self.fake_bot, self.fake_event,
                                          'nocommand'):
         if (x in expected_messages):
             self.message_found = True
     self.assertTrue(self.message_found)