tests: adapt to pass with both 2.2 and 3.2
This commit is contained in:
parent
3f20128208
commit
f4bd375ba7
|
@ -79,10 +79,7 @@ def test_media():
|
|||
app_label = 'data'
|
||||
|
||||
cells = [TextCelleWithMedia() for i in range(3)]
|
||||
assert (
|
||||
force_text(sum((cell.media for cell in cells), Media()))
|
||||
== '<script src="/static/coincoin.js"></script>'
|
||||
)
|
||||
assert '/static/coincoin.js' in force_text(sum((cell.media for cell in cells), Media()))
|
||||
|
||||
|
||||
def test_additional_label():
|
||||
|
|
|
@ -602,7 +602,7 @@ def test_404(app):
|
|||
with override_settings(DEBUG=True):
|
||||
# check error page provides an hint when debugging
|
||||
resp = app.get('/foobar/', status=404)
|
||||
assert "can't find the requested page" in resp.text
|
||||
assert "find the requested page" in resp.text
|
||||
|
||||
# check native django handler is used if all pages are private
|
||||
page.public = False
|
||||
|
|
|
@ -1432,7 +1432,7 @@ def test_index_site_num_queries(settings, app):
|
|||
assert IndexedCell.objects.count() == 50
|
||||
with CaptureQueriesContext(connection) as ctx:
|
||||
index_site()
|
||||
assert len(ctx.captured_queries) == 175
|
||||
assert len(ctx.captured_queries) in (175, 225) # (3.2, 2.2)
|
||||
|
||||
SearchCell.objects.create(
|
||||
page=page, placeholder='content', order=0, _search_services={'data': ['search1']}
|
||||
|
|
Loading…
Reference in New Issue