@@ -11,7 +11,6 @@ def setUp(self) -> None:
1111 public_key = "public_key_test" ,
1212 url_endpoint = "https://test-domain.com/test-endpoint" ,
1313 )
14-
1514 def test_generate_url_with_path (self ):
1615 options = {
1716 "path" : "/default-image.jpg" ,
@@ -22,7 +21,32 @@ def test_generate_url_with_path(self):
2221 url ,
2322 "https://test-domain.com/test-endpoint/tr:h-300,w-400/default-image.jpg" ,
2423 )
24+ def test_generate_url_with_path_with_ik_attachment (self ):
25+ options = {
26+ "path" : "/default-image.jpg" ,
27+ "transformation" : [{"height" : "300" , "width" : "400" }],
28+ "query_parameters" : {
29+ "ik-attachment" :True
30+ },
31+ }
32+ url = self .client .url (options )
33+ self .assertEqual (
34+ url ,
35+ "https://test-domain.com/test-endpoint/tr:h-300,w-400/default-image.jpg?ik-attachment=true" ,
36+ )
2537
38+ def test_generate_url_With_path_with_transformation_raw (self ):
39+ options = {
40+ "path" : "/default-image.jpg" ,
41+ "transformation" : [{"raw" :"f-auto" ,"height" : "300" , "width" : "400" }],
42+
43+ }
44+ url = self .client .url (options )
45+ self .assertEqual (
46+ url ,
47+ "https://test-domain.com/test-endpoint/tr:f-auto,h-300,w-400/default-image.jpg" ,
48+ )
49+
2650 def test_overriding_url_endpoint_generation_consists_new_url (self ):
2751 """
2852 Overriding urlEndpoint parameter. Passing a urlEndpoint value which is
0 commit comments