Skip to content

Commit 1378ca8

Browse files
Added missing successor field to Type object (#229)
Test with `tox`. Ticket: TPT-1887
1 parent 2983b12 commit 1378ca8

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

linode_api4/objects/linode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class Type(Base):
144144
'transfer': Property(filterable=True),
145145
'vcpus': Property(filterable=True),
146146
'gpus': Property(filterable=True),
147+
'successor': Property(),
147148
# type_class is populated from the 'class' attribute of the returned JSON
148149
}
149150

test/fixtures/linode_types.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"price": {
2525
"hourly": 0.0075,
2626
"monthly": 5
27-
}
27+
},
28+
"successor": null
2829
},
2930
{
3031
"disk": 20480,
@@ -47,7 +48,8 @@
4748
"price": {
4849
"hourly": 0.09,
4950
"monthly": 60
50-
}
51+
},
52+
"successor": null
5153
},
5254
{
5355
"disk": 30720,
@@ -70,7 +72,8 @@
7072
"price": {
7173
"hourly": 0.015,
7274
"monthly": 10
73-
}
75+
},
76+
"successor": null
7477
},
7578
{
7679
"disk": 49152,
@@ -93,7 +96,8 @@
9396
"price": {
9497
"hourly": 0.03,
9598
"monthly": 20
96-
}
99+
},
100+
"successor": null
97101
}
98102
]
99103
}

test/objects/linode_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ def test_get_types(self):
326326
self.assertIsNotNone(t.disk)
327327
self.assertIsNotNone(t.type_class)
328328
self.assertIsNotNone(t.gpus)
329+
self.assertIsNone(t.successor)
329330

330331
def test_get_type_by_id(self):
331332
"""

0 commit comments

Comments
 (0)