File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,28 @@ def test_get_devices(self):
6565 Tests that devices can be pulled from a firewall
6666 """
6767 firewall = Firewall (self .client , 123 )
68- self .assertEqual (len (firewall .devices ), 1 )
68+ assert len (firewall .devices ) == 2
69+
70+ assert firewall .devices [0 ].created is not None
71+ assert firewall .devices [0 ].id == 123
72+ assert firewall .devices [0 ].updated is not None
73+
74+ assert firewall .devices [0 ].entity .id == 123
75+ assert firewall .devices [0 ].entity .label == "my-linode"
76+ assert firewall .devices [0 ].entity .type == "linode"
77+ assert firewall .devices [0 ].entity .url == "/v4/linode/instances/123"
78+
79+ assert firewall .devices [1 ].created is not None
80+ assert firewall .devices [1 ].id == 456
81+ assert firewall .devices [1 ].updated is not None
82+
83+ assert firewall .devices [1 ].entity .id == 123
84+ assert firewall .devices [1 ].entity .label is None
85+ assert firewall .devices [1 ].entity .type == "interface"
86+ assert (
87+ firewall .devices [1 ].entity .url
88+ == "/v4/linode/instances/123/interfaces/123"
89+ )
6990
7091 def test_get_device (self ):
7192 """
You can’t perform that action at this time.
0 commit comments