88"""
99
1010import json
11- import sys
12- import tempfile
13- from unittest import mock as mock
1411
15- from SoftLayer .CLI import exceptions
1612from SoftLayer .fixtures import SoftLayer_Hardware_Server
1713from SoftLayer .fixtures import SoftLayer_Search
18- from SoftLayer import SoftLayerError
1914from SoftLayer import testing
20- from SoftLayer import utils
2115
2216
2317class HardwareVlanCLITests (testing .TestCase ):
@@ -36,7 +30,7 @@ def test_hardware_vlan_trunkable_happypath(self):
3630 {
3731 'maxSpeed' : 1000 ,
3832 'networkVlansTrunkable' : [{
39- 'id' :5555 ,
33+ 'id' : 5555 ,
4034 'fullyQualifiedName' : 'test01.ibm99.1234' ,
4135 'name' : 'IBMTEst' ,
4236 'networkSpace' : 'PUBLIC'
@@ -67,7 +61,6 @@ def test_hardware_vlan_trunkable_no_vlans_json(self):
6761 self .assert_no_fail (result )
6862 self .assertEqual ([], output )
6963
70-
7164 # slcli hardware vlan-remove
7265 def test_hardware_vlan_remove (self ):
7366 mock = self .set_mock ('SoftLayer_Search' , 'advancedSearch' )
@@ -97,7 +90,6 @@ def test_hardware_vlan_remove_no_vlans(self):
9790 self .assertEqual ("Argument Error: Error: Missing argument 'VLANS'." , result .exception .message )
9891
9992 def test_hardware_vlan_remove_all_vlans (self ):
100- from pprint import pprint as pp
10193 mock = self .set_mock ('SoftLayer_Search' , 'advancedSearch' )
10294 mock .return_value = SoftLayer_Search .advancedSearchVlan
10395 hardware_mock = self .set_mock ('SoftLayer_Hardware_Server' , 'getObject' )
@@ -139,4 +131,4 @@ def test_hardware_vlan_add_no_vlans(self):
139131 mock .return_value = SoftLayer_Search .advancedSearchVlan
140132 result = self .run_command (['hardware' , 'vlan-add' , '12345' ])
141133 self .assertEqual (2 , result .exit_code )
142- self .assertEqual ("Argument Error: Error: Missing argument 'VLANS'." , result .exception .message )
134+ self .assertEqual ("Argument Error: Error: Missing argument 'VLANS'." , result .exception .message )
0 commit comments