MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testGetParametersOfUrl

Method testGetParametersOfUrl

tests/Requester.py:154–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 )
153
154 def testGetParametersOfUrl(self):
155 self.assertEqual({}, gr.Requester.get_parameters_of_url("https://github.com/api"))
156 self.assertEqual({"per_page": ["10"]}, gr.Requester.get_parameters_of_url("https://github.com/api?per_page=10"))
157 self.assertEqual(
158 {"per_page": ["10"], "page": ["2"]},
159 gr.Requester.get_parameters_of_url("https://github.com/api?per_page=10&page=2"),
160 )
161 self.assertEqual(
162 {"item": ["1", "2", "3"]}, gr.Requester.get_parameters_of_url("https://github.com/api?item=1&item=2&item=3")
163 )
164
165 def testAddParametersToUrl(self):
166 self.assertEqual("https://github.com/api", gr.Requester.add_parameters_to_url("https://github.com/api", {}))

Callers

nothing calls this directly

Calls 1

get_parameters_of_urlMethod · 0.80

Tested by

no test coverage detected