Esempio n. 1
0
 def test_location(self):
     input = Mock(
             match=Mock(group=lambda x: 'KIAD'),
             sender='#phenny', nick='phenny_test')
     f_weather(self.phenny, input)
     
     assert self.phenny.msg.called is True
Esempio n. 2
0
 def test_place(self):
     input = Mock(
             match=Mock(group=lambda x: 'Blacksburg'),
             sender='#phenny', nick='phenny_test')
     f_weather(self.phenny, input)
     
     assert self.phenny.msg.called is True
Esempio n. 3
0
    def test_location(self):
        input = Mock(match=Mock(group=lambda x: 'KIAD'),
                     sender='#phenny',
                     nick='phenny_test')
        f_weather(self.phenny, input)

        assert self.phenny.msg.called is True
Esempio n. 4
0
 def test_notfound(self):
     input = Mock(
             match=Mock(group=lambda x: 'Hell'),
             sender='#phenny', nick='phenny_test')
     f_weather(self.phenny, input)
     
     self.phenny.msg.called_once_with('#phenny',
             "No NOAA data available for that location.")
Esempio n. 5
0
 def test_notfound(self):
     self.input.group.return_value = 'Hell'
     weather.f_weather(self.phenny, self.input)
     self.phenny.say.called_once_with(
         '#phenny', "No NOAA data available for that location.")
Esempio n. 6
0
 def test_place(self):
     self.input.group.return_value = 'Blacksburg'
     weather.f_weather(self.phenny, self.input)
     self.assertTrue(self.phenny.say.called)
Esempio n. 7
0
 def test_airport(self):
     self.input.group.return_value = 'KIAD'
     weather.f_weather(self.phenny, self.input)
     self.assertTrue(self.phenny.say.called)
Esempio n. 8
0
 def test_notfound(self):
     input = Mock(group=lambda x: 'Hell')
     f_weather(self.phenny, input)
     
     self.phenny.say.called_once_with('#phenny',
             "No NOAA data available for that location.")
Esempio n. 9
0
 def test_place(self):
     input = Mock(group=lambda x: 'Blacksburg')
     f_weather(self.phenny, input)
     
     assert self.phenny.say.called is True
Esempio n. 10
0
 def test_airport(self):
     input = Mock(group=lambda x: 'KIAD')
     f_weather(self.phenny, input)
     
     assert self.phenny.say.called is True
Esempio n. 11
0
    def test_notfound(self):
        input = Mock(group=lambda x: 'Hell')
        f_weather(self.phenny, input)

        self.phenny.say.called_once_with(
            '#phenny', "No NOAA data available for that location.")
Esempio n. 12
0
    def test_place(self):
        input = Mock(group=lambda x: 'Blacksburg')
        f_weather(self.phenny, input)

        assert self.phenny.say.called is True
Esempio n. 13
0
    def test_airport(self):
        input = Mock(group=lambda x: 'KIAD')
        f_weather(self.phenny, input)

        assert self.phenny.say.called is True
Esempio n. 14
0
 def test_notfound(self):
     self.input.group.return_value = 'Hell'
     weather.f_weather(self.phenny, self.input)
     self.phenny.say.called_once_with('#phenny',
             "No NOAA data available for that location.")
Esempio n. 15
0
 def test_place(self):
     self.input.group.return_value = 'Blacksburg'
     weather.f_weather(self.phenny, self.input)
     self.assertTrue(self.phenny.say.called)
Esempio n. 16
0
 def test_airport(self):
     self.input.group.return_value = 'KIAD'
     weather.f_weather(self.phenny, self.input)
     self.assertTrue(self.phenny.say.called)