Deleted
Added
1import re 2import unittest 3from unit.applications.proto import TestApplicationProto 4 5 6class TestReturn(TestApplicationProto): 7 prerequisites = {} 8 --- 169 unchanged lines hidden (view full) --- 178 def test_return_invalid(self): 179 def check_error(conf): 180 self.assertIn('error', self.conf(conf, 'routes/0/action')) 181 182 check_error({"return": "200"}) 183 check_error({"return": []}) 184 check_error({"return": 80.1}) 185 check_error({"return": 1000}) |
186 check_error({"return": -1}) |
187 check_error({"return": 200, "share": "/blah"}) 188 189 self.assertIn( 190 'error', self.conf('001', 'routes/0/action/return'), 'leading zero' 191 ) 192 193 check_error({"return": 301, "location": 0}) 194 check_error({"return": 301, "location": []}) 195 196 197if __name__ == '__main__': 198 TestReturn.main() |