summaryrefslogtreecommitdiffstats
path: root/tests/test_pages.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-07-25 14:32:50 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-07-25 14:45:36 (GMT)
commit1b7400a0b4aef8490c795276d82b829e8385e3c9 (patch)
treefc7af0aefc6f1b4b37f8076ec833e9ba274609e7 /tests/test_pages.py
parente50865b722808a6267ecd7da813fcdfb9b030c37 (diff)
downloadcombo-1b7400a0b4aef8490c795276d82b829e8385e3c9.zip
combo-1b7400a0b4aef8490c795276d82b829e8385e3c9.tar.gz
combo-1b7400a0b4aef8490c795276d82b829e8385e3c9.tar.bz2
tests: update tests on the road to python 3
(this includes a switch of lingo tests from django test client to webtest)
Diffstat (limited to 'tests/test_pages.py')
-rw-r--r--tests/test_pages.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_pages.py b/tests/test_pages.py
index 0eb6b3b..b8f40a9 100644
--- a/tests/test_pages.py
+++ b/tests/test_pages.py
@@ -1,4 +1,3 @@
-from StringIO import StringIO
import datetime
import os
import pytest
@@ -8,6 +7,7 @@ from django.conf import settings
from django.contrib.auth.models import User, Group
from django.test import override_settings
from django.test.client import RequestFactory
+from django.utils.six import StringIO
from django.utils.timezone import now
from combo.data.models import Page, CellBase, TextCell, LinkCell
from combo.data.management.commands.import_site import Command as ImportSiteCommand
@@ -23,7 +23,7 @@ def test_page_order():
page2.title = u'bar'
page2.save()
- assert Page.objects.get(id=page.id).order < Page.objects.get(id=page2.id)
+ assert Page.objects.get(id=page.id).order < Page.objects.get(id=page2.id).order
def test_page_url():
page = Page()
@@ -294,5 +294,5 @@ def test_render(app):
page = Page(title=u'foo', slug='foo', template_name='standard-sidebar', order=0, description="page description")
page.save()
response = app.get(page.get_online_url())
- assert '<meta name="description" content="page description" />' in response.content
- assert '<title>Combo - foo</title>' in response.content
+ assert '<meta name="description" content="page description" />' in response.text
+ assert '<title>Combo - foo</title>' in response.text