tests: fixed all tests for python3 BIG changes

This commit is contained in:
RhodeCode Admin 2023-07-18 11:46:31 +02:00
parent 1627525cb1
commit bf561e5914
208 changed files with 2545 additions and 2063 deletions

View file

@ -34,7 +34,9 @@ fixture = Fixture()
def route_path(name, params=None, **kwargs):
import urllib.request, urllib.parse, urllib.error
import urllib.request
import urllib.parse
import urllib.error
from rhodecode.apps._base import ADMIN_PREFIX
base_url = {
@ -133,7 +135,8 @@ class TestNotificationsController(TestController):
u2 = User.get(u2.user_id)
# check DB
get_notif = lambda un: [x.notification for x in un]
def get_notif(un):
return [x.notification for x in un]
assert get_notif(cur_user.notifications) == [notification]
assert get_notif(u1.notifications) == [notification]
assert get_notif(u2.notifications) == [notification]