<86>Mar 4 09:03:54 userdel[55737]: delete user 'rooter' <86>Mar 4 09:03:54 userdel[55737]: removed group 'rooter' owned by 'rooter' <86>Mar 4 09:03:54 userdel[55737]: removed shadow group 'rooter' owned by 'rooter' <86>Mar 4 09:03:54 groupadd[55776]: group added to /etc/group: name=rooter, GID=681 <86>Mar 4 09:03:54 groupadd[55776]: group added to /etc/gshadow: name=rooter <86>Mar 4 09:03:54 groupadd[55776]: new group: name=rooter, GID=681 <86>Mar 4 09:03:54 useradd[55793]: new user: name=rooter, UID=681, GID=681, home=/root, shell=/bin/bash <86>Mar 4 09:03:54 userdel[55867]: delete user 'builder' <86>Mar 4 09:03:54 userdel[55867]: removed group 'builder' owned by 'builder' <86>Mar 4 09:03:54 userdel[55867]: removed shadow group 'builder' owned by 'builder' <86>Mar 4 09:03:54 groupadd[55894]: group added to /etc/group: name=builder, GID=682 <86>Mar 4 09:03:54 groupadd[55894]: group added to /etc/gshadow: name=builder <86>Mar 4 09:03:54 groupadd[55894]: new group: name=builder, GID=682 <86>Mar 4 09:03:54 useradd[55925]: new user: name=builder, UID=682, GID=682, home=/usr/src, shell=/bin/bash <13>Mar 4 09:03:56 rpmi: libgdbm-1.8.3-alt10 1454943334 installed <13>Mar 4 09:03:56 rpmi: libexpat-2.2.4-alt1 1503305345 installed <13>Mar 4 09:03:56 rpmi: libtasn1-4.13-alt2 1521133850 installed <13>Mar 4 09:03:56 rpmi: libp11-kit-0.23.9-alt5 1525798298 installed <13>Mar 4 09:03:56 rpmi: rpm-macros-alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Mar 4 09:03:56 rpmi: alternatives-0.5.0-alt1 sisyphus+221902.300.4.1 1550587121 installed <13>Mar 4 09:03:56 rpmi: ca-certificates-2019.02.01-alt1 sisyphus+220384.200.1.1 1549032756 installed <13>Mar 4 09:03:56 rpmi: ca-trust-0.1.1-alt2 1515595785 installed <13>Mar 4 09:03:56 rpmi: p11-kit-trust-0.23.9-alt5 1525798298 installed <13>Mar 4 09:03:57 rpmi: libcrypto1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Mar 4 09:03:57 rpmi: libssl1.1-1.1.0j-alt1 sisyphus.216647.100 1542743878 installed <13>Mar 4 09:03:57 rpmi: python3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Mar 4 09:03:57 rpmi: python3-base-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Mar 4 09:03:57 rpmi: libpython3-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Mar 4 09:03:57 rpmi: tests-for-installed-python3-pkgs-0.1.13.1-alt2 1535450458 installed <13>Mar 4 09:03:57 rpmi: rpm-build-python3-0.1.13.1-alt2 1535450458 installed <13>Mar 4 09:04:03 rpmi: python3-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Mar 4 09:04:03 rpmi: libtinfo-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Mar 4 09:04:03 rpmi: libncurses-devel-6.1.20180407-alt2 sisyphus+222164.200.1.1 1550686226 installed <13>Mar 4 09:04:03 rpmi: python3-dev-3.6.8-alt1 sisyphus+220164.200.3.1 1548842636 installed <13>Mar 4 09:04:03 rpmi: python-modules-curses-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:03 rpmi: libverto-0.3.0-alt1_7 sisyphus+223221.100.1.1 1551348953 installed <13>Mar 4 09:04:03 rpmi: libkeyutils-1.6-alt2 sisyphus.217337.100 1544003161 installed <13>Mar 4 09:04:03 rpmi: libcom_err-1.44.5-alt1 sisyphus+221902.2000.4.1 1550595809 installed <86>Mar 4 09:04:03 groupadd[98516]: group added to /etc/group: name=_keytab, GID=499 <86>Mar 4 09:04:03 groupadd[98516]: group added to /etc/gshadow: name=_keytab <86>Mar 4 09:04:03 groupadd[98516]: new group: name=_keytab, GID=499 <13>Mar 4 09:04:04 rpmi: libkrb5-1.16.3-alt1 sisyphus.219042.100 1547045815 installed <13>Mar 4 09:04:04 rpmi: libtirpc-1.0.3-alt1 1532008017 installed <13>Mar 4 09:04:04 rpmi: libnsl2-1.1.0-alt1_1 1511548749 installed <13>Mar 4 09:04:04 rpmi: python-modules-email-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-unittest-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-nis-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-encodings-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-compiler-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-ctypes-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-multiprocessing-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-logging-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-tools-2to3-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-module-pkg_resources-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Mar 4 09:04:04 rpmi: python-modules-xml-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-hotshot-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-bsddb-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-modules-distutils-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: libnsl2-devel-1.1.0-alt1_1 1511548749 installed <13>Mar 4 09:04:04 rpmi: python-dev-2.7.15-alt1 sisyphus.217364.100 1544022423 installed <13>Mar 4 09:04:04 rpmi: python-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed <13>Mar 4 09:04:04 rpmi: python3-module-setuptools-1:40.8.0-alt1 sisyphus+221229.100.2.1 1550559950 installed Building target platforms: i586 Building for target i586 Wrote: /usr/src/in/nosrpm/python-module-zope.app.file-3.6.1-alt4.1.1.nosrc.rpm Installing python-module-zope.app.file-3.6.1-alt4.1.1.src.rpm Building target platforms: i586 Building for target i586 Executing(%prep): /bin/sh -e /usr/src/tmp/rpm-tmp.51745 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + rm -rf python-module-zope.app.file-3.6.1 + echo 'Source #0 (python-module-zope.app.file-3.6.1.tar):' Source #0 (python-module-zope.app.file-3.6.1.tar): + /bin/tar -xf /usr/src/RPM/SOURCES/python-module-zope.app.file-3.6.1.tar + cd python-module-zope.app.file-3.6.1 + /bin/chmod -c -Rf u+rwX,go-w . + cp -fR . ../python3 + exit 0 Executing(%build): /bin/sh -e /usr/src/tmp/rpm-tmp.43928 + umask 022 + /bin/mkdir -p /usr/src/RPM/BUILD + cd /usr/src/RPM/BUILD + cd python-module-zope.app.file-3.6.1 + CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CFLAGS + CXXFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export CXXFLAGS + FFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 -march=i586 -mtune=generic' + export FFLAGS + /usr/bin/python setup.py build running build running build_py creating build creating build/lib creating build/lib/zope copying src/zope/__init__.py -> build/lib/zope creating build/lib/zope/app copying src/zope/app/__init__.py -> build/lib/zope/app creating build/lib/zope/app/file copying src/zope/app/file/testing.py -> build/lib/zope/app/file copying src/zope/app/file/interfaces.py -> build/lib/zope/app/file copying src/zope/app/file/image.py -> build/lib/zope/app/file copying src/zope/app/file/i18n.py -> build/lib/zope/app/file copying src/zope/app/file/file.py -> build/lib/zope/app/file copying src/zope/app/file/__init__.py -> build/lib/zope/app/file creating build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_image.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_functional_put.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/test_file.py -> build/lib/zope/app/file/tests copying src/zope/app/file/tests/__init__.py -> build/lib/zope/app/file/tests creating build/lib/zope/app/file/browser copying src/zope/app/file/browser/image.py -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file.py -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/__init__.py -> build/lib/zope/app/file/browser creating build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_imagedata.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_functional.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/test_file.py -> build/lib/zope/app/file/browser/tests copying src/zope/app/file/browser/tests/__init__.py -> build/lib/zope/app/file/browser/tests running egg_info writing requirements to src/zope.app.file.egg-info/requires.txt writing src/zope.app.file.egg-info/PKG-INFO writing namespace_packages to src/zope.app.file.egg-info/namespace_packages.txt writing top-level names to src/zope.app.file.egg-info/top_level.txt writing dependency_links to src/zope.app.file.egg-info/dependency_links.txt reading manifest file 'src/zope.app.file.egg-info/SOURCES.txt' writing manifest file 'src/zope.app.file.egg-info/SOURCES.txt' copying src/zope/app/file/configure.zcml -> build/lib/zope/app/file copying src/zope/app/file/ftesting.zcml -> build/lib/zope/app/file copying src/zope/app/file/browser/configure.zcml -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file.txt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_add.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_icon.gif -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/file_upload.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/image_edit.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/image_icon.gif -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/preview.pt -> build/lib/zope/app/file/browser copying src/zope/app/file/browser/url.txt -> build/lib/zope/app/file/browser + pushd ../python3 ~/RPM/BUILD/python3 ~/RPM/BUILD/python-module-zope.app.file-3.6.1 + find -type f -name '*.py' -exec 2to3 -w -n '{}' + RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored ./src/zope/app/file/tests/test_image.py RefactoringTool: Refactored ./src/zope/app/file/tests/test_functional_put.py --- ./src/zope/app/file/tests/test_image.py (original) +++ ./src/zope/app/file/tests/test_image.py (refactored) @@ -68,8 +68,8 @@ self.assertEqual(image.getImageSize(), (16, 16)) def testInterface(self): - self.failUnless(IImage.implementedBy(Image)) - self.failUnless(verifyClass(IImage, Image)) + self.assertTrue(IImage.implementedBy(Image)) + self.assertTrue(verifyClass(IImage, Image)) class TestFileAdapters(unittest.TestCase): @@ -109,50 +109,50 @@ def test_image(self): factory = FileFactory(None) f = factory("spam.txt", "image/foo", "hello world") - self.assert_(isinstance(f, Image), f) + self.assertTrue(isinstance(f, Image), f) f = factory("spam.txt", "", zptlogo) - self.assert_(isinstance(f, Image), f) + self.assertTrue(isinstance(f, Image), f) def test_text(self): factory = FileFactory(None) f = factory("spam.txt", "", "hello world") - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "", "\0\1\2\3\4") - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "text/splat", zptlogo) - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) f = factory("spam.txt", "application/splat", zptlogo) - self.assert_(isinstance(f, File), f) - self.assert_(not isinstance(f, Image), f) + self.assertTrue(isinstance(f, File), f) + self.assertTrue(not isinstance(f, Image), f) class TestSized(unittest.TestCase): def testInterface(self): from zope.size.interfaces import ISized - self.failUnless(ISized.implementedBy(ImageSized)) - self.failUnless(verifyClass(ISized, ImageSized)) + self.assertTrue(ISized.implementedBy(ImageSized)) + self.assertTrue(verifyClass(ISized, ImageSized)) def test_zeroSized(self): s = ImageSized(DummyImage(0, 0, 0)) self.assertEqual(s.sizeForSorting(), ('byte', 0)) - self.assertEqual(s.sizeForDisplay(), u'0 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '0 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '0') self.assertEqual(s.sizeForDisplay().mapping['height'], '0') def test_arbitrarySize(self): s = ImageSized(DummyImage(34, 56, 78)) self.assertEqual(s.sizeForSorting(), ('byte', 78)) - self.assertEqual(s.sizeForDisplay(), u'1 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '1 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '34') self.assertEqual(s.sizeForDisplay().mapping['height'], '56') def test_unknownSize(self): s = ImageSized(DummyImage(-1, -1, 23)) self.assertEqual(s.sizeForSorting(), ('byte', 23)) - self.assertEqual(s.sizeForDisplay(), u'1 KB ${width}x${height}') + self.assertEqual(s.sizeForDisplay(), '1 KB ${width}x${height}') self.assertEqual(s.sizeForDisplay().mapping['width'], '?') self.assertEqual(s.sizeForDisplay().mapping['height'], '?') --- ./src/zope/app/file/tests/test_functional_put.py (original) +++ ./src/zope/app/file/tests/test_functional_put.py (refactored) @@ -34,13 +34,13 @@ This is just a test.""") - self.assertEquals(response.getStatus(), 201) - self.assertEquals(response.getHeader("Location"), + self.assertEqual(response.getStatus(), 201) + self.assertEqual(response.getHeader("Location"), "http://localhost/testfile.txt") response = http(r"""GET /testfRefactoringTool: No changes to ./src/zope/app/file/tests/test_file.py RefactoringTool: No changes to ./src/zope/app/file/testing.py RefactoringTool: Refactored ./src/zope/app/file/interfaces.py RefactoringTool: Refactored ./src/zope/app/file/image.py RefactoringTool: No changes to ./src/zope/app/file/i18n.py RefactoringTool: Refactored ./src/zope/app/file/file.py RefactoringTool: No changes to ./src/zope/app/file/browser/tests/test_imagedata.py RefactoringTool: Refactored ./src/zope/app/file/browser/tests/test_functional.py ile.txt HTTP/1.1 Authorization: Basic globalmgr:globalmgrpw""") - self.assertEquals(response.getBody(), "This is just a test.") + self.assertEqual(response.getBody(), "This is just a test.") # now modify it response = http(r"""PUT /testfile.txt HTTP/1.1 @@ -49,12 +49,12 @@ Content-Type: text/plain And now it is modified.""") - self.assertEquals(response.getStatus(), 200) - self.assertEquals(response.getBody(), "") + self.assertEqual(response.getStatus(), 200) + self.assertEqual(response.getBody(), "") response = http(r"""GET /testfile.txt HTTP/1.1 Authorization: Basic globalmgr:globalmgrpw""") - self.assertEquals(response.getBody(), "And now it is modified.") + self.assertEqual(response.getBody(), "And now it is modified.") def test_suite(): --- ./src/zope/app/file/interfaces.py (original) +++ ./src/zope/app/file/interfaces.py (refactored) @@ -25,16 +25,16 @@ class IFile(Interface): contentType = BytesLine( - title = _(u'Content Type'), - description=_(u'The content type identifies the type of data.'), + title = _('Content Type'), + description=_('The content type identifies the type of data.'), default='', required=False, missing_value='' ) data = Bytes( - title=_(u'Data'), - description=_(u'The actual content of the object.'), + title=_('Data'), + description=_('The actual content of the object.'), default='', missing_value='', required=False, --- ./src/zope/app/file/image.py (original) +++ ./src/zope/app/file/image.py (refactored) @@ -18,7 +18,7 @@ __docformat__ = 'restructuredtext' import struct -from cStringIO import StringIO +from io import StringIO from zope.interface import implements from zope.size.interfaces import ISized --- ./src/zope/app/file/file.py (original) +++ ./src/zope/app/file/file.py (refactored) @@ -131,7 +131,7 @@ def _setData(self, data) : # Handle case when data is a string - if isinstance(data, unicode): + if isinstance(data, str): data = data.encode('UTF-8') if isinstance(data, str): @@ -233,7 +233,7 @@ return len(data) def __str__(self): - next = self.next + next = self.__next__ if next is None: return self._data @@ -241,7 +241,7 @@ while next is not None: self = next result.append(self._data) - next = self.next + next = self.__next__ return ''.join(result) --- ./src/zope/app/file/browser/tests/test_functional.py (original) +++ ./src/zope/app/file/browser/tests/test_functional.py (refactored) @@ -19,7 +19,7 @@ import re import unittest from xml.sax.saxutils import escape -from StringIO import StringIO +from io import StringIO from zope.testing import renormalizing from zope.app.testing import functional @@ -32,7 +32,7 @@ class FileTest(BrowserTestCase): - content = u'File ' + content = 'File ' def addFile(self): file = File(self.content) @@ -46,28 +46,28 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Add a File' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_('Object Name' in body) - self.assert_('"Add"' in body) + self.assertTrue('Add a File' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue('Object Name' in body) + self.assertTrue('"Add"' in body) self.checkForBrokenLinks(body, '/+/zope.app.file.File=', 'mgr:mgrpw') def testAdd(self): response = self.publish( '/+/zope.app.file.File=', - form={'type_name': u'zope.app.file.File', + form={'type_name': 'zope.app.file.File', 'field.data': StringIO('A file'), 'field.data.used': '', - 'add_input_name': u'file', - 'UPDATE_SUBMIT': u'Add'}, + 'add_input_name': 'file', + 'UPDATE_SUBMIT': 'Add'}, basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 302) self.assertEqual(response.getHeader('Location'), 'http://localhost/@@contents.html') root = self.getRootFolder() - self.assert_('file' in root) + self.assertTrue('file' in root) file = root['file'] self.assertEqual(file.data, 'A file') @@ -76,16 +76,16 @@ data.filename="test.txt" response = self.publish( '/+/zope.app.file.File=', - form={'type_name': u'zope.app.file.File', + form={'type_name': 'zope.app.file.File', 'field.data': data, 'field.data.used': '', - 'UPDATE_SUBMIT': u'Add'}, + 'UPDATE_SUBMIT': 'Add'}, basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 302) self.assertEqual(response.getHeader('Location'), 'http://localhost/@@contents.html') root = self.getRootFolder() - self.assert_('test.txt' in root) + self.assertTrue('test.txt' in root) file = root['test.txt'] self.assertEqual(file.data, 'File Contents') @@ -96,27 +96,27 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Change a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_(escape(self.content) in body) + self.assertTrue('Change a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue(escape(self.content) in body) self.checkForBrokenLinks(body, '/file/@@edit.html', 'mgr:mgrpw') def testEdit(self): self.addFile() response = self.publish( '/file/@@edit.html', - form={'field.data': u'

A File

', - 'field.data.used': '', - 'field.contentType': u'text/plain', - 'UPDATE_SUBMIT': u'Edit'}, - basic='mgr:mgrpw') - self.assertEqual(response.getStatus(), 200) - body = response.getBody() - self.assert_('Change a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.assert_(escape(u'

A File

') in body) + form={'field.data': '

A File

', + 'field.data.used': '', + 'field.contentType': 'text/plain', + 'UPDATE_SUBMIT': 'Edit'}, + basic='mgr:mgrpw') + self.assertEqual(response.getStatus(), 200) + body = response.getBody() + self.assertTrue('Change a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertTrue(escape('

A File

') in body) root = self.getRootFolder() file = root['file'] self.assertEqual(file.data, '

A File

') @@ -129,10 +129,10 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('Upload a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.failIf(escape(self.content) in body) + self.assertTrue('Upload a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertFalse(escape(self.content) in body) self.checkForBrokenLinks(body, '/file/@@upload.html', 'mgr:mgrpw') def testUpload(self): @@ -141,15 +141,15 @@ '/file/@@upload.html', form={'field.data': StringIO('

A file

'), 'field.data.used': '', - 'field.contentType': u'text/plain', - 'UPDATE_SUBMIT': u'Change'}, - basic='mgr:mgrpw') - self.assertEqual(response.getStatus(), 200) - body = response.getBody() - self.assert_('Upload a file' in body) - self.assert_('Content Type' in body) - self.assert_('Data' in body) - self.failIf(escape(u'

A File

') in body) + 'field.contentType': 'text/plain', + 'UPDATE_SUBMIT': 'Change'}, + basic='mgr:mgrpw') + self.assertEqual(response.getStatus(), 200) + body = response.getBody() + self.assertTrue('Upload a file' in body) + self.assertTrue('Content Type' in body) + self.assertTrue('Data' in body) + self.assertFalse(escape('

A File

') in body) root = self.getRootFolder() file = root['file'] self.assertEqual(file.data, '

A file

') @@ -172,7 +172,7 @@ basic='mgr:mgrpw') self.assertEqual(response.getStatus(), 200) body = response.getBody() - self.assert_('