We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7c1443 commit 1691706Copy full SHA for 1691706
2 files changed
tests/unit_tests/images/test_images.py
@@ -1,3 +1,5 @@
1
+import json
2
+
3
import responses # https://github.com/getsentry/responses
4
from responses import matchers
5
@@ -35,6 +37,7 @@ def test_images(http_client):
35
37
assert isinstance(images[0].details, list)
36
38
assert images[0].details[0] == 'Ubuntu 20.04'
39
assert images[0].details[1] == 'CUDA 11.0'
40
+ assert json.loads(str(images[0])) == IMAGE_RESPONSE
41
42
43
def test_images_filter_by_instance_type(http_client):
verda/images/_images.py
@@ -22,6 +22,9 @@ class Image:
22
image_type: str
23
details: list[str]
24
25
+ def __str__(self) -> str:
26
+ return self.to_json(indent=2)
27
28
29
class ImagesService:
30
"""A service for interacting with the images endpoint."""
0 commit comments