integrations: fixed code for python3
This commit is contained in:
parent
c2374e21e3
commit
1f5a8fe199
4 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue