Esempio n. 1
0
class SmsAPIGateTestCase(TestCase):

    def setUp(self):
        self.gate = SmsAPIGateFactory()

    def test_get_common_handler(self):
        self.assertEqual(self.gate.get_handler(), SmsHandler)

    def test_get_custom_handler(self):
        self.gate.handler = SmsAPIGate.HANDLERS.custom
        self.gate.save()
        self.assertEqual(self.gate.get_handler(), CustomSmsHandler)
Esempio n. 2
0
 def setUp(self):
     self.gate = SmsAPIGateFactory()