tests(bad-data): fixed some pre python3 tests that no longer work exactly the same

This commit is contained in:
RhodeCode Admin 2023-12-01 10:17:58 +01:00
parent a507c058d8
commit 0701d1fca5

View file

@ -1,5 +1,3 @@
# Copyright (C) 2016-2023 RhodeCode GmbH
#
# This program is free software: you can redistribute it and/or modify
@ -18,10 +16,7 @@
# RhodeCode Enterprise Edition, including its added features, Support services,
# and proprietary license terms, please see https://rhodecode.com/licenses/
import pytest
from rhodecode.tests import TestController
from rhodecode.tests.fixture import Fixture
class TestBadRequestData(TestController):
@ -29,12 +24,12 @@ class TestBadRequestData(TestController):
def test_bad_get_data(self):
self.app.get(
'/', params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20'},
status=400)
status=200)
def test_bad_url_data(self):
self.app.post(
'/f\xfc',
status=400)
status=404)
def test_bad_post_data(self, csrf_token, xhr_header):
self.app.post(
@ -42,4 +37,4 @@ class TestBadRequestData(TestController):
params={'f\xfc': '\xfc%f6%22%20onmouseover%3dveA2(9352)%20',
'csrf_token': csrf_token},
extra_environ=xhr_header,
status=400)
status=200)