Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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.")
Exemplo 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.")
Exemplo 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)
Exemplo 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)
Exemplo 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.")
Exemplo 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
Exemplo 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
Exemplo 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.")
Exemplo 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
Exemplo 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
Exemplo 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.")
Exemplo 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)
Exemplo 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)