forked from linode/linode_api4-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage_tests.py
More file actions
27 lines (21 loc) · 816 Bytes
/
Copy pathimage_tests.py
File metadata and controls
27 lines (21 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from test.base import ClientBaseCase
from linode.objects import Image
class ImageTest(ClientBaseCase):
"""
Tests methods of the Image class
"""
def test_get_image(self):
"""
Tests that an image is loaded correctly by ID
"""
image = Image(self.client, 'linode/debian9')
self.assertEqual(image._populated, False)
self.assertEqual(image.label, 'Debian 9')
self.assertEqual(image._populated, True)
self.assertEqual(image.vendor, 'Debian')
self.assertEqual(image.description, None)
self.assertEqual(image.deprecated, False)
self.assertEqual(image.status, "available")
self.assertEqual(image.type, "manual")
self.assertEqual(image.created_by, "linode")
self.assertEqual(image.size, 1100)