Commits

Branko Vukelic committed 14a0473

Renamed with_url_params to url_params

Comments (0)

Files changed (2)

tests/test_with_url_params_tag.py

 
 from unittest import TestCase
 
-from url_tools.templatetags.urls import with_url_params
+from url_tools.templatetags.urls import url_params
 
 
-class WithUrlParamsTestCase(TestCase):
-    def test_with_url_params_basically_works(self):
+class UrlParamsTestCase(TestCase):
+    def test_url_params_basically_works(self):
         self.assertEquals(
-            with_url_params('/foo?foo=1', bar='2'),
+            url_params('/foo?foo=1', bar='2'),
             '/foo?foo=1&bar=2'
         )
 
     def test_can_override_existing_params(self):
         self.assertEqual(
-            with_url_params('/foo?foo=1', foo='2'),
+            url_params('/foo?foo=1', foo='2'),
             '/foo?foo=2'
         )

url_tools/templatetags/urls.py

 
 
 @register.assignment_tag
-def with_url_params(url, **kwargs):
+def url_params(url, **kwargs):
     u = UrlHelper(url)
     u.update_query_data(**kwargs)
     return u.get_full_path()