Skip to content

Commit

Permalink
Improve tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 23, 2018
1 parent 4ea1528 commit 569dfd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/OFS/tests/testProperties.py
Expand Up @@ -99,8 +99,7 @@ def test_updateProperty_transforms(self):
self.assertEqual(pm.getProperty('test_lines'), (b'bar', b'baz'))

pm._updateProperty('test_lines', six.u('uni\ncode'))
self.assertEqual(pm.getProperty('test_lines'),
(six.b('uni'), six.b('code')))
self.assertEqual(pm.getProperty('test_lines'), (b'uni', b'code'))


class TestPropertySheet(unittest.TestCase):
Expand Down Expand Up @@ -137,7 +136,4 @@ def test_updateProperty_transforms(self):
self.assertEqual(ps.getProperty('test_lines'), (b'bar', b'baz'))

ps._updateProperty('test_lines', six.u('uni\ncode'))
self.assertEqual(ps.getProperty('test_lines'),
(six.b('uni'), six.b('code')))


self.assertEqual(ps.getProperty('test_lines'), (b'uni', b'code'))
2 changes: 1 addition & 1 deletion src/ZPublisher/tests/testHTTPRequest.py
Expand Up @@ -184,7 +184,7 @@ def _valueIsOrHoldsTainted(self, val):

elif type(val) in (str, unicode):
self.assertFalse(
'<' in val,
should_be_tainted(val),
"'%s' is dangerous and should have been tainted." % val)

return retval
Expand Down

0 comments on commit 569dfd2

Please sign in to comment.