MCPcopy
hub / github.com/hugapi/hug / test_requires

Method test_requires

tests/test_routing.py:200–202  ·  view source on GitHub ↗

Test to ensure requirements can be added on the fly

(self)

Source from the content-addressed store, hash-verified

198 assert "parse_body" not in self.route.parse_body(False).route
199
200 def test_requires(self):
201 """Test to ensure requirements can be added on the fly"""
202 assert self.route.requires(("values",)).route["requires"] == ("love", "values")
203
204 def test_doesnt_require(self):
205 """Ensure requirements can be selectively removed on the fly"""

Callers

nothing calls this directly

Calls 1

requiresMethod · 0.80

Tested by

no test coverage detected