Skip to content

Commit f8e88bc

Browse files
autopep8 changes
1 parent fbe3b03 commit f8e88bc

File tree

8 files changed

+67
-64
lines changed

8 files changed

+67
-64
lines changed

tests/CLI/modules/globalip_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_create(self, confirm_mock):
7979
{
8080
"item": "Total monthly cost",
8181
"cost": "2.00"
82-
}])
82+
}])
8383

8484
def test_ip_unassign(self):
8585
result = self.run_command(['globalip', 'unassign', '1'])

tests/CLI/modules/server_tests.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -692,19 +692,19 @@ def test_dns_sync_both(self, confirm_mock):
692692
'getResourceRecords')
693693
getResourceRecords.return_value = []
694694
createAargs = ({
695-
'type': 'a',
696-
'host': 'hardware-test1',
697-
'domainId': 12345, # from SoftLayer_Account::getDomains
698-
'data': '172.16.1.100',
699-
'ttl': 7200
700-
},)
695+
'type': 'a',
696+
'host': 'hardware-test1',
697+
'domainId': 12345, # from SoftLayer_Account::getDomains
698+
'data': '172.16.1.100',
699+
'ttl': 7200
700+
},)
701701
createPTRargs = ({
702-
'type': 'ptr',
703-
'host': '100',
704-
'domainId': 123456,
705-
'data': 'hardware-test1.test.sftlyr.ws',
706-
'ttl': 7200
707-
},)
702+
'type': 'ptr',
703+
'host': '100',
704+
'domainId': 123456,
705+
'data': 'hardware-test1.test.sftlyr.ws',
706+
'ttl': 7200
707+
},)
708708

709709
result = self.run_command(['hw', 'dns-sync', '1000'])
710710

@@ -747,12 +747,12 @@ def test_dns_sync_v6(self, confirm_mock):
747747
}
748748
}
749749
createV6args = ({
750-
'type': 'aaaa',
751-
'host': 'hardware-test1',
752-
'domainId': 12345, # from SoftLayer_Account::getDomains
753-
'data': '2607:f0d0:1b01:0023:0000:0000:0000:0004',
754-
'ttl': 7200
755-
},)
750+
'type': 'aaaa',
751+
'host': 'hardware-test1',
752+
'domainId': 12345, # from SoftLayer_Account::getDomains
753+
'data': '2607:f0d0:1b01:0023:0000:0000:0000:0004',
754+
'ttl': 7200
755+
},)
756756
server.return_value = test_server
757757
result = self.run_command(['hw', 'dns-sync', '--aaaa-record', '1000'])
758758
self.assert_no_fail(result)

tests/CLI/modules/subnet_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_lookup(self):
173173
"netmask": "255.255.255.192",
174174
"gateway": "10.47.16.129",
175175
"type": "PRIMARY"
176-
}})
176+
}})
177177

178178
@mock.patch('SoftLayer.CLI.formatting.no_going_back')
179179
def test_cancel(self, confirm_mock):

tests/CLI/modules/ticket_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
class FakeTTY():
1717
"""A fake object to fake STD input"""
18+
1819
def __init__(self, isatty=False, read="Default Output"):
1920
"""Sets isatty and read"""
2021
self._isatty = isatty

tests/CLI/modules/vs/vs_create_tests.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -113,26 +113,26 @@ def test_create_by_router(self, confirm_mock):
113113
self.assert_no_fail(result)
114114
self.assert_called_with('SoftLayer_Product_Order', 'placeOrder')
115115
args = ({
116-
'startCpus': 2,
117-
'maxMemory': 1024,
118-
'hostname': 'host',
119-
'domain': 'example.com',
120-
'localDiskFlag': True,
121-
'hourlyBillingFlag': True,
122-
'supplementalCreateObjectOptions': {'bootMode': None},
123-
'operatingSystemReferenceCode': 'UBUNTU_LATEST',
124-
'datacenter': {'name': 'dal05'},
125-
'primaryBackendNetworkComponent': {
116+
'startCpus': 2,
117+
'maxMemory': 1024,
118+
'hostname': 'host',
119+
'domain': 'example.com',
120+
'localDiskFlag': True,
121+
'hourlyBillingFlag': True,
122+
'supplementalCreateObjectOptions': {'bootMode': None},
123+
'operatingSystemReferenceCode': 'UBUNTU_LATEST',
124+
'datacenter': {'name': 'dal05'},
125+
'primaryBackendNetworkComponent': {
126126
'router': {
127127
'id': 577940
128128
}
129-
},
130-
'primaryNetworkComponent': {
131-
'router': {
132-
'id': 1639255
133-
}
134-
}
135-
},)
129+
},
130+
'primaryNetworkComponent': {
131+
'router': {
132+
'id': 1639255
133+
}
134+
}
135+
},)
136136

137137
self.assert_called_with('SoftLayer_Virtual_Guest', 'generateOrderTemplate', args=args)
138138

tests/CLI/modules/vs/vs_tests.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ def test_create_options_prices(self):
322322
self.assert_no_fail(result)
323323

324324
def test_create_options_prices_location(self):
325-
result = self.run_command(['vs', 'create-options', '--prices', 'dal13', '--vsi-type', 'TRANSIENT_CLOUD_SERVER'])
325+
result = self.run_command(['vs', 'create-options', '--prices', 'dal13',
326+
'--vsi-type', 'TRANSIENT_CLOUD_SERVER'])
326327
self.assert_no_fail(result)
327328

328329
@mock.patch('SoftLayer.CLI.formatting.confirm')
@@ -344,19 +345,19 @@ def test_dns_sync_both(self, confirm_mock):
344345
'getResourceRecords')
345346
getResourceRecords.return_value = []
346347
createAargs = ({
347-
'type': 'a',
348-
'host': 'vs-test1',
349-
'domainId': 12345, # from SoftLayer_Account::getDomains
350-
'data': '172.16.240.2',
351-
'ttl': 7200
352-
},)
348+
'type': 'a',
349+
'host': 'vs-test1',
350+
'domainId': 12345, # from SoftLayer_Account::getDomains
351+
'data': '172.16.240.2',
352+
'ttl': 7200
353+
},)
353354
createPTRargs = ({
354-
'type': 'ptr',
355-
'host': '2',
356-
'domainId': 123456,
357-
'data': 'vs-test1.test.sftlyr.ws',
358-
'ttl': 7200
359-
},)
355+
'type': 'ptr',
356+
'host': '2',
357+
'domainId': 123456,
358+
'data': 'vs-test1.test.sftlyr.ws',
359+
'ttl': 7200
360+
},)
360361

361362
result = self.run_command(['vs', 'dns-sync', '100'])
362363

@@ -399,12 +400,12 @@ def test_dns_sync_v6(self, confirm_mock):
399400
}
400401
}
401402
createV6args = ({
402-
'type': 'aaaa',
403-
'host': 'vs-test1',
404-
'domainId': 12345,
405-
'data': '2607:f0d0:1b01:0023:0000:0000:0000:0004',
406-
'ttl': 7200
407-
},)
403+
'type': 'aaaa',
404+
'host': 'vs-test1',
405+
'domainId': 12345,
406+
'data': '2607:f0d0:1b01:0023:0000:0000:0000:0004',
407+
'ttl': 7200
408+
},)
408409
guest.return_value = test_guest
409410
result = self.run_command(['vs', 'dns-sync', '--aaaa-record', '100'])
410411
self.assert_no_fail(result)

tests/managers/hardware_tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,10 @@ def test_edit(self):
557557
self.assert_called_with('SoftLayer_Hardware_Server',
558558
'editObject',
559559
args=({
560-
'hostname': 'new-host',
561-
'domain': 'new.sftlyr.ws',
562-
'notes': 'random notes',
563-
},),
560+
'hostname': 'new-host',
561+
'domain': 'new.sftlyr.ws',
562+
'notes': 'random notes',
563+
},),
564564
identifier=100)
565565

566566
def test_rescue(self):

tests/managers/ordering_tests.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def test_get_item_capacity_core(self):
744744
"capacity": "1",
745745
"id": 10201,
746746
"keyName": "GUEST_CORE_1_DEDICATED",
747-
}]
747+
}]
748748

749749
item_capacity = self.ordering.get_item_capacity(items, ['GUEST_CORE_1_DEDICATED', 'OS_RHEL_7_X_LAMP_64_BIT'])
750750

@@ -761,7 +761,7 @@ def test_get_item_capacity_storage(self):
761761
"capacity": "1",
762762
"id": 10201,
763763
"keyName": "READHEAVY_TIER",
764-
}]
764+
}]
765765

766766
item_capacity = self.ordering.get_item_capacity(items, ['READHEAVY_TIER', 'STORAGE_SPACE_FOR_2_IOPS_PER_GB'])
767767

@@ -779,7 +779,7 @@ def test_get_item_capacity_intel(self):
779779
"capacity": "1",
780780
"id": 10201,
781781
"keyName": "GUEST_CORE_1_DEDICATED",
782-
}]
782+
}]
783783

784784
item_capacity = self.ordering.get_item_capacity(items, ['INTEL_XEON_2690_2_60', 'BANDWIDTH_20000_GB'])
785785

@@ -848,7 +848,8 @@ def test_resolve_location_name_invalid(self):
848848
self.assertIn("Invalid location", str(exc))
849849

850850
def test_resolve_location_name_not_exist(self):
851-
exc = self.assertRaises(exceptions.SoftLayerError, self.ordering.resolve_location_name, "UNKNOWN_LOCATION_TEST")
851+
exc = self.assertRaises(exceptions.SoftLayerError,
852+
self.ordering.resolve_location_name, "UNKNOWN_LOCATION_TEST")
852853
self.assertIn("does not exist", str(exc))
853854

854855
# https://github.com/softlayer/softlayer-python/issues/1425

0 commit comments

Comments
 (0)