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
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
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
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.")
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.")
def test_place(self): self.input.group.return_value = 'Blacksburg' weather.f_weather(self.phenny, self.input) self.assertTrue(self.phenny.say.called)
def test_airport(self): self.input.group.return_value = 'KIAD' weather.f_weather(self.phenny, self.input) self.assertTrue(self.phenny.say.called)
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.")
def test_place(self): input = Mock(group=lambda x: 'Blacksburg') f_weather(self.phenny, input) assert self.phenny.say.called is True
def test_airport(self): input = Mock(group=lambda x: 'KIAD') f_weather(self.phenny, input) assert self.phenny.say.called is True
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.")
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.")