diff --git a/aodh/tests/functional/api/v2/test_query.py b/aodh/tests/functional/api/v2/test_query.py index 9472857ae..57b215433 100644 --- a/aodh/tests/functional/api/v2/test_query.py +++ b/aodh/tests/functional/api/v2/test_query.py @@ -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, diff --git a/aodh/tests/unit/test_notifier.py b/aodh/tests/unit/test_notifier.py index 1791e338c..3d324414b 100644 --- a/aodh/tests/unit/test_notifier.py +++ b/aodh/tests/unit/test_notifier.py @@ -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'])