Skip to content

Commit

Permalink
use assertIs/assertIn
Browse files Browse the repository at this point in the history
  • Loading branch information
tschorr committed Oct 5, 2018
1 parent b442a4d commit 6533079
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ZPublisher/tests/test_xmlrpc.py
Original file line number Diff line number Diff line change
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.assertIs(method, None)

This comment has been minimized.

Copy link
@icemac

icemac Oct 5, 2018

Member

There is even self.assertIsNone().

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.assertTrue(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 6533079

Please sign in to comment.