This is an automated email from the ASF dual-hosted git repository. tonysun83 pushed a commit to branch fix-explicit-exists-operator in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit cfb62f2baec01919f61ce678962b96fb044a1184 Author: Tony Sun <[email protected]> AuthorDate: Mon Nov 13 10:45:34 2017 -0800 change assert to assertEqual --- src/mango/test/07-text-custom-field-list-test.py | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mango/test/07-text-custom-field-list-test.py b/src/mango/test/07-text-custom-field-list-test.py index 921ae45..6229097 100644 --- a/src/mango/test/07-text-custom-field-list-test.py +++ b/src/mango/test/07-text-custom-field-list-test.py @@ -174,39 +174,39 @@ class CustomFieldsExistsTest(mango.UserDocsTextTests): def test_exists_field(self): docs = self.db.find({"exists_field": {"$exists": True}}) - assert len(docs) == 2 + self.assertEqual(len(docs), 2) for d in docs: - assert d["user_id"] in (7, 8) + self.assertIn(d["user_id"] in (7, 8)) docs = self.db.find({"exists_field": {"$exists": False}}) - assert len(docs) == len(user_docs.DOCS) - 2 + self.assertEqual(len(docs), len(user_docs.DOCS) - 2) for d in docs: - assert d["user_id"] not in (7, 8) + self.assertNotIn(d["user_id"], (7, 8)) def test_exists_array(self): docs = self.db.find({"exists_array": {"$exists": True}}) - assert len(docs) == 2 + self.assertEqual(len(docs), 2) for d in docs: - assert d["user_id"] in (9, 10) + self.assertIn(d["user_id"], (9, 10)) docs = self.db.find({"exists_array": {"$exists": False}}) - assert len(docs) == len(user_docs.DOCS) - 2 + self.assertEqual(len(docs), len(user_docs.DOCS) - 2) for d in docs: - assert d["user_id"] not in (9, 10) + self.assertNotIn(d["user_id"], (9, 10)) def test_exists_object_member(self): docs = self.db.find({"exists_object.should": {"$exists": True}}) - assert len(docs) == 1 - assert docs[0]["user_id"] == 11 + self.assertEqual(len(docs), 1) + self.assertEqual(docs[0]["user_id"], 11) docs = self.db.find({"exists_object.should": {"$exists": False}}) - assert len(docs) == len(user_docs.DOCS) - 1 + self.assertEqual(len(docs), len(user_docs.DOCS) - 1) for d in docs: - assert d["user_id"] != 11 + self.assertNotEqual(d["user_id"], 11) def test_exists_false_same_as_views(self): docs = self.db.find({ "twitter": {"$exists": False} }) for d in docs: - assert d["user_id"] not in (0, 1, 4, 13) + self.assertNotIn(d["user_id"], (0, 1, 4, 13)) -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
