예제 #1
0
 def test_parse_failure(self):
     with self.assertRaises(NotParseable):
         ObjectId.parse(b'?', Params())
예제 #2
0
 def test_parse(self):
     ret, buf = ObjectId.parse(b'  one_2-three four', Params())
     self.assertIsInstance(ret, ObjectId)
     self.assertEqual(b'one_2-three', ret.value)
     self.assertEqual(b' four', buf)