示例#1
0
 def test_add_param_to_file_wo_params(self):
     url_with_file = "http://example.com/file.html"
     self.assertEqual(utils.add_param_to_url(url_with_file), "http://example.com/file.html?grayscale=1")
示例#2
0
 def test_add_param_to_domain_w_params(self):
     url_domain_only = "http://example.com?param1=2"
     self.assertEqual(utils.add_param_to_url(url_domain_only), "http://example.com?param1=2&grayscale=1")
示例#3
0
 def test_add_param_to_path_wo_params(self):
     url_with_path = "http://example.com/abc/efg/"
     self.assertEqual(utils.add_param_to_url(url_with_path), "http://example.com/abc/efg/?grayscale=1")