'Verify that URLs returned by the model are constructed correctly.'

@override_settings(CREDENTIALS_INTERNAL_SERVICE_URL=CREDENTIALS_INTERNAL_SERVICE_URL, CREDENTIALS_PUBLIC_SERVICE_URL=CREDENTIALS_PUBLIC_SERVICE_URL)
def test_url_construction(self):

    credentials_config = self.create_credentials_config()
    expected = '{root}/api/{version}/'.format(root=CREDENTIALS_INTERNAL_SERVICE_URL.strip('/'), version=API_VERSION)
    self.assertEqual(credentials_config.internal_api_url, expected)
    expected = '{root}/api/{version}/'.format(root=CREDENTIALS_PUBLIC_SERVICE_URL.strip('/'), version=API_VERSION)
    self.assertEqual(credentials_config.public_api_url, expected)
