diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2022-09-06 22:29:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 22:29:50 +0200 |
commit | b4bdd09c56aa5dedb475529e75ce73c092ca0898 (patch) | |
tree | acb6df0e2e3745bdc2e87d47488abf3c310a9b9c /tests/oauth1/rfc5849/test_signatures.py | |
parent | 0adbbe10ed8ef822d1c780987fffc56670ce3f9f (diff) | |
parent | 9aa45aaff0cdeab258d18c025cf66e9bdba529c0 (diff) | |
download | oauthlib-b4bdd09c56aa5dedb475529e75ce73c092ca0898.tar.gz |
Merge pull request #818 from dasm/master
OAuth1: Allow IPv6 addresses being parsed by signature
Diffstat (limited to 'tests/oauth1/rfc5849/test_signatures.py')
-rw-r--r-- | tests/oauth1/rfc5849/test_signatures.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/oauth1/rfc5849/test_signatures.py b/tests/oauth1/rfc5849/test_signatures.py index 4e6d962..2d4735e 100644 --- a/tests/oauth1/rfc5849/test_signatures.py +++ b/tests/oauth1/rfc5849/test_signatures.py @@ -229,6 +229,26 @@ class SignatureTests(TestCase): base_string_uri('http:///path', 'OVERRIDE.example.com')) # ---------------- + # Host: valid host allows for IPv4 and IPv6 + + self.assertEqual( + 'https://192.168.0.1/', + base_string_uri('https://192.168.0.1') + ) + self.assertEqual( + 'https://192.168.0.1:13000/', + base_string_uri('https://192.168.0.1:13000') + ) + self.assertEqual( + 'https://[123:db8:fd00:1000::5]:13000/', + base_string_uri('https://[123:db8:fd00:1000::5]:13000') + ) + self.assertEqual( + 'https://[123:db8:fd00:1000::5]/', + base_string_uri('https://[123:db8:fd00:1000::5]') + ) + + # ---------------- # Port: default ports always excluded; non-default ports always included self.assertEqual( |