Add hostname test

This commit is contained in:
Michael Lazar 2021-11-26 15:22:10 -05:00
parent 2a8f945e87
commit b1fc5d74e4
1 changed files with 7 additions and 0 deletions

View File

@ -230,6 +230,13 @@ class FunctionalTestCase(unittest.TestCase):
resp = self.request("gemini://café.localhost\r\n") resp = self.request("gemini://café.localhost\r\n")
self.assertEqual(resp, "20 text/gemini\r\nJetforce rules!\n") self.assertEqual(resp, "20 text/gemini\r\nJetforce rules!\n")
def test_hostname_case_insensitive(self):
"""
In the URI spec, the authority component is case-insensitive.
"""
resp = self.request("gemini://LocalHost\r\n")
self.assertEqual(resp, "20 text/gemini\r\nJetforce rules!\n")
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()