dj32: remove use of force_text (#72942)
This commit is contained in:
parent
9e1e43b1da
commit
972ce33d5d
|
@ -5,7 +5,6 @@ from unittest import mock
|
|||
from xml.etree import ElementTree as etree
|
||||
|
||||
import pytest
|
||||
from django.utils.encoding import force_text
|
||||
from utils import FakedResponse, get_tests_file_content
|
||||
|
||||
from petale.models import CUT, Petal
|
||||
|
@ -59,7 +58,7 @@ def test_access_control_list(app, partner_southpark, cut_kevin_uuid, petal_books
|
|||
|
||||
#
|
||||
app.authorization = ('Basic', ('library', 'library'))
|
||||
payload = json.loads(force_text(get_tests_file_content('books.json')))
|
||||
payload = json.loads(get_tests_file_content('books.json'))
|
||||
url = '/api/southpark/%s/loans/' % cut_kevin_uuid
|
||||
resp = app.put_json(url, params=payload, headers={'If-None-Match': '*'}, status=201)
|
||||
|
||||
|
@ -71,7 +70,7 @@ def test_access_control_list(app, partner_southpark, cut_kevin_uuid, petal_books
|
|||
def test_simple_api(app, partner_southpark, cut_kevin_uuid, acl, petal_invoice):
|
||||
app.authorization = ('Basic', ('library', 'library'))
|
||||
|
||||
payload = json.loads(force_text(get_tests_file_content('books.json')))
|
||||
payload = json.loads(get_tests_file_content('books.json'))
|
||||
url = '/api/southpark/%s/loans/' % cut_kevin_uuid
|
||||
|
||||
# test create key without content-type
|
||||
|
@ -419,7 +418,7 @@ def test_cut_uuid_idp_checking(mocked_post, settings, app, acl):
|
|||
def test_storage_error(app, partner_southpark, cut_kevin_uuid, acl, caplog):
|
||||
app.authorization = ('Basic', ('library', 'library'))
|
||||
|
||||
payload = json.loads(force_text(get_tests_file_content('books.json')))
|
||||
payload = json.loads(get_tests_file_content('books.json'))
|
||||
url = '/api/southpark/%s/loans/' % cut_kevin_uuid
|
||||
|
||||
app.put_json(url, params=payload, headers={'If-None-Match': '*'}, status=201)
|
||||
|
@ -440,7 +439,7 @@ def test_concurrent_put(app, transactional_db, settings):
|
|||
|
||||
app.authorization = ('Basic', ('library', 'library'))
|
||||
|
||||
payload = json.loads(force_text(get_tests_file_content('books.json')))
|
||||
payload = json.loads(get_tests_file_content('books.json'))
|
||||
url = '/api/%s/%s/loans/' % (southpark.name, uuid)
|
||||
|
||||
pool_count = 5
|
||||
|
|
Loading…
Reference in New Issue