Skip to content

Commit

Permalink
Fix deprecation and resource warnings (#362)
Browse files Browse the repository at this point in the history
fix deprecation and resource warning
  • Loading branch information
tschorr committed Oct 5, 2018
1 parent 854a7c5 commit 51253e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/App/tests/testImageFile.py
Expand Up @@ -67,3 +67,4 @@ def test_index_html(self):
self.assertIsInstance(result, io.FileIO)
self.assertTrue(b''.join(result).startswith(b'\x89PNG\r\n'))
self.assertEqual(len(result), image.size)
result.close()
8 changes: 4 additions & 4 deletions src/ZPublisher/tests/test_xmlrpc.py
Expand Up @@ -50,9 +50,9 @@ def test_setBody(self):
as_set, method = xmlrpclib.loads(body_str)
as_set = as_set[0]

self.assertEqual(method, None)
self.assertFalse('_secret' in as_set.keys())
self.assertTrue('public' in as_set.keys())
self.assertIsNone(method)
self.assertNotIn('_secret', as_set.keys())
self.assertIn('public', as_set.keys())
self.assertEqual(as_set['public'], 'def')

def test_nil(self):
Expand All @@ -61,7 +61,7 @@ def test_nil(self):
response = self._makeOne(faux)
response.setBody(body)
data, method = xmlrpclib.loads(faux._body)
self.assert_(data[0]['public'] is None)
self.assertIs(data[0]['public'], None)

def test_instance(self):
# Instances are turned into dicts with their private
Expand Down

0 comments on commit 51253e0

Please sign in to comment.