MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / TestAPI

Class TestAPI

tests/test_uritemplate.py:614–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612
613
614class TestAPI(unittest.TestCase):
615 uri = "https://api.github.com{/endpoint}"
616
617 def test_expand(self) -> None:
618 self.assertEqual(
619 expand(self.uri, {"endpoint": "users"}),
620 "https://api.github.com/users",
621 )
622
623 def test_partial(self) -> None:
624 self.assertEqual(partial(self.uri), URITemplate(self.uri))
625 uri = self.uri + "/sigmavirus24{/other}"
626 self.assertEqual(
627 partial(uri, endpoint="users"),
628 URITemplate("https://api.github.com/users/sigmavirus24{/other}"),
629 )
630
631 def test_variables(self) -> None:
632 self.assertEqual(
633 variables(self.uri), URITemplate(self.uri).variable_names
634 )
635
636
637class TestNativeTypeSupport(unittest.TestCase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…