def test_initial_from_config_with_endpoints(self): initial = RapidSmsForm.initial_from_config({ 'allowed_endpoints': ['default', 'extra'] }) self.assertEqual(initial, { 'allowed_endpoints': u'default,extra', })
def test_initial_from_config(self): initial = RapidSmsForm.initial_from_config({ "rapidsms_url": "http://www.example.com/", "rapidsms_username": "******", "rapidsms_password": "******", "rapidsms_auth_method": "basic", "rapidsms_http_method": "POST", }) self.assertEqual(initial, { 'rapidsms_url': 'http://www.example.com/', 'rapidsms_username': '******', 'rapidsms_password': '******', 'rapidsms_auth_method': 'basic', 'rapidsms_http_method': 'POST', 'allowed_endpoints': u'default', })
def test_initial_from_config(self): initial = RapidSmsForm.initial_from_config({ "rapidsms_url": "http://www.example.com/", "rapidsms_username": "******", "rapidsms_password": "******", "rapidsms_auth_method": "basic", "rapidsms_http_method": "POST", }) self.assertEqual( initial, { 'rapidsms_url': 'http://www.example.com/', 'rapidsms_username': '******', 'rapidsms_password': '******', 'rapidsms_auth_method': 'basic', 'rapidsms_http_method': 'POST', 'allowed_endpoints': u'default', })
def test_initial_from_config_with_endpoints(self): initial = RapidSmsForm.initial_from_config( {'allowed_endpoints': ['default', 'extra']}) self.assertEqual(initial, { 'allowed_endpoints': u'default,extra', })