Пример #1
0
class AlarmsTestCase(unittest.TestCase):
    def setUp(self):
        super(AlarmsTestCase, self).setUp()
        self.config = data.get_test_alarms_config()
        self.alarm = TemperatureAlarm(self.config)

    def test_sends_twilio_sms(self):
        with mock.patch('pybrew.alarm.TwilioRestClient') as mock_client:
            self.alarm.me_brew_is_fecked(0, 0)

        self.assertTrue(mock_client.called)
Пример #2
0
 def setUp(self):
     super(AlarmsTestCase, self).setUp()
     self.config = data.get_test_alarms_config()
     self.alarm = TemperatureAlarm(self.config)