MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / test_kwargs

Method test_kwargs

test/test_dbref.py:92–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90 self.assertFalse(DBRef("coll", obj_id, "foo") != DBRef("coll", obj_id, "foo"))
91
92 def test_kwargs(self):
93 self.assertEqual(DBRef("coll", 5, foo="bar"), DBRef("coll", 5, foo="bar"))
94 self.assertNotEqual(DBRef("coll", 5, foo="bar"), DBRef("coll", 5))
95 self.assertNotEqual(DBRef("coll", 5, foo="bar"), DBRef("coll", 5, foo="baz"))
96 self.assertEqual("bar", DBRef("coll", 5, foo="bar").foo)
97 self.assertRaises(AttributeError, getattr, DBRef("coll", 5, foo="bar"), "bar")
98
99 def test_deepcopy(self):
100 a = DBRef("coll", "asdf", "db", x=[1])

Callers

nothing calls this directly

Calls 1

DBRefClass · 0.90

Tested by

no test coverage detected