##// END OF EJS Templates
tests(bad-data): fixed some pre python3 tests that no longer work exactly the same
super-admin -
r5217:56288af3 default
parent child Browse files
Show More
@@ -1,5 +1,3 b''
1
2
3 # Copyright (C) 2016-2023 RhodeCode GmbH
1 # Copyright (C) 2016-2023 RhodeCode GmbH
4 #
2 #
5 # This program is free software: you can redistribute it and/or modify
3 # This program is free software: you can redistribute it and/or modify
@@ -18,10 +16,7 b''
18 # RhodeCode Enterprise Edition, including its added features, Support services,
16 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
18
21 import pytest
22
23 from rhodecode.tests import TestController
19 from rhodecode.tests import TestController
24 from rhodecode.tests.fixture import Fixture
25
20
26
21
27 class TestBadRequestData(TestController):
22 class TestBadRequestData(TestController):
@@ -29,12 +24,12 b' class TestBadRequestData(TestController)'
29 def test_bad_get_data(self):
24 def test_bad_get_data(self):
30 self.app.get(
25 self.app.get(
31 '/', params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20'},
26 '/', params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20'},
32 status=400)
27 status=200)
33
28
34 def test_bad_url_data(self):
29 def test_bad_url_data(self):
35 self.app.post(
30 self.app.post(
36 '/f\xfc',
31 '/f\xfc',
37 status=400)
32 status=404)
38
33
39 def test_bad_post_data(self, csrf_token, xhr_header):
34 def test_bad_post_data(self, csrf_token, xhr_header):
40 self.app.post(
35 self.app.post(
@@ -42,4 +37,4 b' class TestBadRequestData(TestController)'
42 params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20',
37 params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20',
43 'csrf_token': csrf_token},
38 'csrf_token': csrf_token},
44 extra_environ=xhr_header,
39 extra_environ=xhr_header,
45 status=400)
40 status=200)
General Comments 0
You need to be logged in to leave comments. Login now