Skip to content

Commit bda6602

Browse files
committed
test: sdk-version suffix in url
1 parent 9c3e67d commit bda6602

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/test_generate_url.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def test_generate_url_with_path(self):
2424
self.assertIn(options["url_endpoint"], url)
2525
self.assertIn("300", url)
2626
self.assertIn("300", url)
27-
self.assertEqual(
28-
url,
27+
self.assertIn(
2928
"https://ik.imagekit.io/your_imagekit_id/endpoint/tr:h-300,w-400/default-image.jpg",
29+
url
3030
)
3131

3232
def test_generate_url_with_src(self):
@@ -103,3 +103,14 @@ def test_url_with_signed_without_seconds(self):
103103
}
104104

105105
self.assertIsNot(self.client.url(options), "")
106+
107+
def test_url_contains_sdk_version(self):
108+
options = {
109+
"path": "/default-image.jpg",
110+
"url_endpoint": "https://ik.imagekit.io/your_imagekit_id/endpoint/",
111+
"transformation": [{"height": "300", "width": "400"}],
112+
"signed": True,
113+
"transformation_position": "query",
114+
}
115+
116+
self.assertIn('sdk-version', self.client.url(options))

0 commit comments

Comments
 (0)