integrations: fixed code for python3

This commit is contained in:
RhodeCode Admin 2023-07-18 11:06:55 +02:00
parent c2374e21e3
commit 1f5a8fe199
4 changed files with 6 additions and 4 deletions

View file

@ -36,7 +36,7 @@ class ValidIntegrationPredicate(object):
self.val = val
def text(self):
return 'valid_integration_route = %s' % self.val
return f'valid_integration_route = {self.val}'
phash = text

View file

@ -74,7 +74,7 @@ def _post_integration_test_helper(app, url, csrf_token, repo, repo_group,
('__end__', 'settings:mapping'),
]
errors_response = app.post(url, form_data)
assert 'Errors exist' in errors_response.body
assert 'Errors exist' in errors_response.text
form_data[-2] = ('test_string_field', 'data!')
assert Session().query(Integration).count() == 0

View file

@ -23,7 +23,9 @@ import string
import collections
import logging
import requests
import urllib.request, urllib.parse, urllib.error
import urllib.request
import urllib.parse
import urllib.error
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry

View file

@ -266,7 +266,7 @@ class IntegrationSettingsViewBase(BaseAppView):
"""
_ = self.request.translate
controls = self.request.POST.items()
controls = list(self.request.POST.items())
pstruct = peppercorn.parse(controls)
if self.integration and pstruct.get('delete'):