Use assertIn and assertNotIn for test
because assertIn and assertNotIn raise more meaningful errors Change-Id: I4b691d3ef271c8e5ecfcae8257b940213756cf07
This commit is contained in:
parent
63b1232b5b
commit
63bf149723
@ -274,7 +274,7 @@ class TestQueryToKwArgs(tests_base.BaseTestCase):
|
||||
request.headers.return_value = {'X-ProjectId': 'foobar'}
|
||||
kwargs = utils.query_to_kwargs(queries,
|
||||
storage.SampleFilter.__init__)
|
||||
self.assertFalse('self' in kwargs)
|
||||
self.assertNotIn('self', kwargs)
|
||||
|
||||
def test_sample_filter_translation(self):
|
||||
queries = [v2_base.Query(field=f,
|
||||
|
@ -287,7 +287,7 @@ class FakeZaqarClient(object):
|
||||
def subscription(self, queue_name, **kwargs):
|
||||
self.client.assertEqual('foobar-critical', queue_name)
|
||||
subscribers = ['http://example.com/data', 'mailto:foo@example.com']
|
||||
self.client.assertTrue(kwargs['subscriber'] in subscribers)
|
||||
self.client.assertIn(kwargs['subscriber'], subscribers)
|
||||
self.client.assertEqual('7200', kwargs['ttl'])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user