Пример #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
Пример #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
Пример #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
Пример #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.")
Пример #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.")
Пример #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)
Пример #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)
Пример #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.")
Пример #9
0
 def test_place(self):
     input = Mock(group=lambda x: 'Blacksburg')
     f_weather(self.phenny, input)
     
     assert self.phenny.say.called is True
Пример #10
0
 def test_airport(self):
     input = Mock(group=lambda x: 'KIAD')
     f_weather(self.phenny, input)
     
     assert self.phenny.say.called is True
Пример #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.")
Пример #12
0
    def test_place(self):
        input = Mock(group=lambda x: 'Blacksburg')
        f_weather(self.phenny, input)

        assert self.phenny.say.called is True
Пример #13
0
    def test_airport(self):
        input = Mock(group=lambda x: 'KIAD')
        f_weather(self.phenny, input)

        assert self.phenny.say.called is True
Пример #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.")
Пример #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)
Пример #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)