Exemplo n.º 1
0
    def test_partial_config_is_invalid(self, settings):
        settings.TWILIO_ACCOUNT_SID = 'test account sid'
        settings.TWILIO_AUTH_TOKEN = ''
        settings.TWILIO_PHONE_NUMBER = ''

        with pytest.raises(ImproperlyConfigured,
                           match="TWILIO_ACCOUNT_SID is non-empty, but"):
            validate_settings()
Exemplo n.º 2
0
 def test_no_account_sid_is_valid(self, settings):
     settings.TWILIO_ACCOUNT_SID = ''
     validate_settings()
Exemplo n.º 3
0
 def test_all_settings_is_valid(self, settings):
     apply_twilio_settings(settings)
     validate_settings()