pylinting

parent 1622801a
...@@ -209,8 +209,7 @@ class TestSlap(SlapMixin): ...@@ -209,8 +209,7 @@ class TestSlap(SlapMixin):
if parsed_url.path == 'registerComputerPartition' and \ if parsed_url.path == 'registerComputerPartition' and \
parsed_qs['computer_reference'][0] == computer_guid and \ parsed_qs['computer_reference'][0] == computer_guid and \
parsed_qs['computer_partition_reference'][0] == partition_id: parsed_qs['computer_partition_reference'][0] == partition_id:
partition = slapos.slap.ComputerPartition( slapos.slap.ComputerPartition(computer_guid, partition_id)
computer_guid, partition_id)
return (404, {}, '') return (404, {}, '')
else: else:
return (0, {}, '') return (0, {}, '')
...@@ -299,7 +298,6 @@ class TestComputer(SlapMixin): ...@@ -299,7 +298,6 @@ class TestComputer(SlapMixin):
slap = self.slap slap = self.slap
slap.initializeConnection(self.server_url) slap.initializeConnection(self.server_url)
partition_id = 'PARTITION_01'
def server_response(self, path, method, body, header): def server_response(self, path, method, body, header):
parsed_url = urlparse.urlparse(path.lstrip('/')) parsed_url = urlparse.urlparse(path.lstrip('/'))
parsed_qs = urlparse.parse_qs(parsed_url.query) parsed_qs = urlparse.parse_qs(parsed_url.query)
...@@ -419,7 +417,6 @@ class TestComputerPartition(SlapMixin): ...@@ -419,7 +417,6 @@ class TestComputerPartition(SlapMixin):
def test_request_sends_request(self): def test_request_sends_request(self):
partition_id = 'PARTITION_01' partition_id = 'PARTITION_01'
request_called_amount = 0
def server_response(self, path, method, body, header): def server_response(self, path, method, body, header):
parsed_url = urlparse.urlparse(path.lstrip('/')) parsed_url = urlparse.urlparse(path.lstrip('/'))
parsed_qs = urlparse.parse_qs(parsed_url.query) parsed_qs = urlparse.parse_qs(parsed_url.query)
...@@ -775,7 +772,6 @@ class TestOpenOrder(SlapMixin): ...@@ -775,7 +772,6 @@ class TestOpenOrder(SlapMixin):
computer_guid = self._getTestComputerId() computer_guid = self._getTestComputerId()
requested_partition_id = 'PARTITION_01' requested_partition_id = 'PARTITION_01'
def server_response(self, path, method, body, header): def server_response(self, path, method, body, header):
parsed_url = urlparse.urlparse(path.lstrip('/'))
from slapos.slap.slap import SoftwareInstance from slapos.slap.slap import SoftwareInstance
slap_partition = SoftwareInstance( slap_partition = SoftwareInstance(
slap_computer_id=computer_guid, slap_computer_id=computer_guid,
......
...@@ -430,7 +430,7 @@ class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase): ...@@ -430,7 +430,7 @@ class TestSlapgridCPWithMaster(MasterMixin, unittest.TestCase):
def test_nothing_to_do(self): def test_nothing_to_do(self):
computer = ComputerForTest(self.software_root,self.instance_root,0,0) ComputerForTest(self.software_root,self.instance_root, 0, 0)
self.assertEqual(self.grid.processComputerPartitionList(), slapgrid.SLAPGRID_SUCCESS) self.assertEqual(self.grid.processComputerPartitionList(), slapgrid.SLAPGRID_SUCCESS)
self.assertSortedListEqual(os.listdir(self.instance_root), ['etc', 'var']) self.assertSortedListEqual(os.listdir(self.instance_root), ['etc', 'var'])
......
...@@ -173,7 +173,7 @@ class TestSoftwareSlapObject(BasicMixin, unittest.TestCase): ...@@ -173,7 +173,7 @@ class TestSoftwareSlapObject(BasicMixin, unittest.TestCase):
) )
software.install() software.install()
def test_software_install_networkcache_upload_blacklist(self): def test_software_install_networkcache_upload_blacklist_side_effect(self):
""" """
Check if the networkcache upload blacklist parameters only prevent Check if the networkcache upload blacklist parameters only prevent
blacklisted Software Release to be uploaded. blacklisted Software Release to be uploaded.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment