Ejemplo n.º 1
0
 def test_make_file_path_given_url_with_extension(self):
     value = "http://www.test-site.com/index.html"
     extension = ".html"
     expected_result = "http--www.test-site.com-index.html"
     self.assertEqual(make_file_path(value, extension), expected_result)
Ejemplo n.º 2
0
 def test_make_file_path_given_too_long_url(self):
     value = "http://reallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlend.php"
     extension = ".php"
     expected_result = "http--reallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlreallylongurlen.php"
     self.assertEqual(make_file_path(value, extension), expected_result)
Ejemplo n.º 3
0
 def test_make_file_path_given_url_without_extension(self):
     value = "https://github.com"
     extension = ".html"
     expected_result = "https--github.com.html"
     self.assertEqual(make_file_path(value, extension), expected_result)