diff --git a/slapos/tests/test_slapproxy/__init__.py b/slapos/tests/test_slapproxy/__init__.py index 744e260f10fe2da34f7fd4fede52c4a6881ed081..4053c204f9ef30cc3019e2a3e50573e95382ec54 100644 --- a/slapos/tests/test_slapproxy/__init__.py +++ b/slapos/tests/test_slapproxy/__init__.py @@ -615,6 +615,31 @@ class TestRequest(MasterMixin): partition_parameter_kw={'text': u'Привет Мир!'}) self.assertIsInstance(request, slapos.slap.ComputerPartition) + def test_request_with_int(self): + """ + Verify that request with int parameters is correctly accepted + """ + self.add_free_partition(1) + request = self.request('http://sr//', None, 'myinstance', 'slappart0', + partition_parameter_kw={'int': 1}) + self.assertIsInstance(request, slapos.slap.ComputerPartition) + + def test_request_set_connection_parameters_with_int(self): + """ + Verify that request int works in connection parameters + """ + self.add_free_partition(1) + partition_id = self.request('http://sr//', None, 'myinstance', 'slappart0')._partition_id + # Set connection parameter + partition = self.getPartitionInformation(partition_id) + + self.setConnectionDict(partition_id=partition_id, + connection_dict={'foo': 1}) + + # Get updated information for the partition + partition_new = self.request('http://sr//', None, 'myinstance', 'slappart0') + self.assertEqual(partition_new.getConnectionParameter('foo'), '1') + class TestSlaveRequest(MasterMixin): """