Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_vanilla_merge_url_params,
_yarl_merge_url_params
)
def test_base_without_params_returns_corrected_url(self, func):
if func in self._get_merge_functions():
expected_url = 'http://example.com/api?x=42#fragment'
self.assertEqual(
func(self.url_without_parameters, {'x': 42}),
expected_url
)
def _get_merge_functions(self):
if yarl_available:
return {
_vanilla_merge_url_params,
_yarl_merge_url_params
}
return {
_vanilla_merge_url_params,
}