def test_with_changed_suffix(self): url = get_well_known_url('https://authlib.org', suffix='openid-configuration') self.assertEqual(url, '/.well-known/openid-configuration') url = get_well_known_url('https://authlib.org', external=True, suffix='openid-configuration') self.assertEqual( url, 'https://authlib.org/.well-known/openid-configuration')
def test_no_suffix_issuer(self): self.assertEqual(get_well_known_url('https://authlib.org'), WELL_KNOWN_URL) self.assertEqual(get_well_known_url('https://authlib.org/'), WELL_KNOWN_URL)
def test_with_external(self): self.assertEqual( get_well_known_url('https://authlib.org', external=True), 'https://authlib.org' + WELL_KNOWN_URL)
def test_with_suffix_issuer(self): self.assertEqual(get_well_known_url('https://authlib.org/issuer1'), WELL_KNOWN_URL + '/issuer1') self.assertEqual(get_well_known_url('https://authlib.org/a/b/c'), WELL_KNOWN_URL + '/a/b/c')