MCPcopy Create free account
hub / github.com/Boris-code/feapder / test_update

Method test_update

tests/test_mongodb.py:115–121  ·  view source on GitHub ↗

测试单条数据更新

(self)

Source from the content-addressed store, hash-verified

113 self.assertEqual(add_count, 0)
114
115 def test_update(self):
116 """
117 测试单条数据更新
118 """
119 data = {"a": 1, "b": "你好", "c": "666"}
120 r = self.db.update(self.coll_name, data, {"a": 1})
121 self.assertEqual(r, True)
122
123 def test_delete(self):
124 r = self.db.delete(self.coll_name, {"a": 1})

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected