test_settings.py (1029:687f7cc7aae2) test_settings.py (1064:75a64629661f)
1import time
2import socket
3import unittest
4from unit.applications.lang.python import TestApplicationPython
5
6
7class TestSettings(TestApplicationPython):
8 prerequisites = ['python']

--- 201 unchanged lines hidden (view full) ---

210
211 self.conf({'http': {'max_body_size': 5}}, 'settings')
212
213 self.assertEqual(self.post(body='01234')['status'], 200, 'status size')
214 self.assertEqual(
215 self.post(body='012345')['status'], 413, 'status size max'
216 )
217
1import time
2import socket
3import unittest
4from unit.applications.lang.python import TestApplicationPython
5
6
7class TestSettings(TestApplicationPython):
8 prerequisites = ['python']

--- 201 unchanged lines hidden (view full) ---

210
211 self.conf({'http': {'max_body_size': 5}}, 'settings')
212
213 self.assertEqual(self.post(body='01234')['status'], 200, 'status size')
214 self.assertEqual(
215 self.post(body='012345')['status'], 413, 'status size max'
216 )
217
218 @unittest.expectedFailure
218 @unittest.skip('not yet')
219 def test_settings_negative_value(self):
220 self.assertIn(
221 'error',
222 self.conf({'http': {'max_body_size': -1}}, 'settings'),
223 'settings negative value',
224 )
225
226
227if __name__ == '__main__':
228 TestSettings.main()
219 def test_settings_negative_value(self):
220 self.assertIn(
221 'error',
222 self.conf({'http': {'max_body_size': -1}}, 'settings'),
223 'settings negative value',
224 )
225
226
227if __name__ == '__main__':
228 TestSettings.main()