예제 #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)