diff --git a/zerver/tests/test_narrow.py b/zerver/tests/test_narrow.py index 9671997891..0b8f59cadc 100644 --- a/zerver/tests/test_narrow.py +++ b/zerver/tests/test_narrow.py @@ -327,7 +327,7 @@ class NarrowBuilderTest(ZulipTestCase): if params is not None: actual_params = query.compile().params self.assertEqual(actual_params, params) - self.assertTrue(where_clause in str(query)) + self.assertIn(where_clause, str(query)) def _build_query(self, term: Dict[str, Any]) -> Query: return self.builder.add_term(self.raw_query, term)