Example #1
0
 def test_uri_with_args_overwrite_multiple_values(self):
     uri_with_multiple_values = 'http://uri.com/?f=1&f=2'
     result = views._uri_with_args(uri_with_multiple_values, f=3)
     expected = 'http://uri.com/?f=3'
     self.assertEqual(result, expected)
Example #2
0
 def test_uri_with_args_add_something(self):
     any_uri = 'http://any.com/uri?with=args'
     result = views._uri_with_args(any_uri, something='new')
     expected_result = any_uri + '&something=new'
     self.assertEqual(expected_result, result)
Example #3
0
 def test_uri_with_args_preserve_multiple_values(self):
     uri_with_multiple_values = 'http://uri.com/?f=1&f=2'
     result = views._uri_with_args(uri_with_multiple_values)
     self.assertEqual(uri_with_multiple_values, result)
Example #4
0
 def test_uri_with_args_no_change(self):
     any_uri = 'http://any.com/uri?with=args&something=else'
     result = views._uri_with_args(any_uri)
     self.assertEqual(any_uri, result)