| 612 | |
| 613 | |
| 614 | class 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 | |
| 637 | class TestNativeTypeSupport(unittest.TestCase): |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…