File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ def instance_create(
343343 if placement_group
344344 else None
345345 ),
346- "interface_generaiton " : interface_generation ,
346+ "interface_generation " : interface_generation ,
347347 "network_helper" : network_helper ,
348348 }
349349
Original file line number Diff line number Diff line change 11from test .unit .base import ClientBaseCase
22
3- from linode_api4 import InstancePlacementGroupAssignment
3+ from linode_api4 import InstancePlacementGroupAssignment , InterfaceGeneration
44from linode_api4 .objects import ConfigInterface
55
66
@@ -96,6 +96,27 @@ def test_create_with_placement_group(self):
9696 m .call_data ["placement_group" ], {"id" : 123 , "compliant_only" : True }
9797 )
9898
99+ def test_instance_create_with_interface_generation (self ):
100+ """
101+ Tests that the metadata field is populated on Linode create.
102+ """
103+
104+ with self .mock_post ("linode/instances/124" ) as m :
105+ self .client .linode .instance_create (
106+ "g6-nanode-1" ,
107+ "us-southeast" ,
108+ interface_generation = InterfaceGeneration .LINODE ,
109+ )
110+
111+ self .assertEqual (
112+ m .call_data ,
113+ {
114+ "region" : "us-southeast" ,
115+ "type" : "g6-nanode-1" ,
116+ "interface_generation" : "linode" ,
117+ },
118+ )
119+
99120
100121class TypeTest (ClientBaseCase ):
101122 def test_get_types (self ):
You can’t perform that action at this time.
0 commit comments