##// 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,45 +1,40 b''
1
2
3 1 # Copyright (C) 2016-2023 RhodeCode GmbH
4 2 #
5 3 # This program is free software: you can redistribute it and/or modify
6 4 # it under the terms of the GNU Affero General Public License, version 3
7 5 # (only), as published by the Free Software Foundation.
8 6 #
9 7 # This program is distributed in the hope that it will be useful,
10 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 10 # GNU General Public License for more details.
13 11 #
14 12 # You should have received a copy of the GNU Affero General Public License
15 13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 14 #
17 15 # This program is dual-licensed. If you wish to learn more about the
18 16 # RhodeCode Enterprise Edition, including its added features, Support services,
19 17 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 18
21 import pytest
22
23 19 from rhodecode.tests import TestController
24 from rhodecode.tests.fixture import Fixture
25 20
26 21
27 22 class TestBadRequestData(TestController):
28 23
29 24 def test_bad_get_data(self):
30 25 self.app.get(
31 26 '/', params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20'},
32 status=400)
27 status=200)
33 28
34 29 def test_bad_url_data(self):
35 30 self.app.post(
36 31 '/f\xfc',
37 status=400)
32 status=404)
38 33
39 34 def test_bad_post_data(self, csrf_token, xhr_header):
40 35 self.app.post(
41 36 '/_markup_preview',
42 37 params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20',
43 38 'csrf_token': csrf_token},
44 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