| 407 | self.assertFalse(self.fs.exists({"foo": {"$gt": 12}})) |
| 408 | |
| 409 | def test_put_unicode(self): |
| 410 | with self.assertRaises(TypeError): |
| 411 | self.fs.put("hello") |
| 412 | |
| 413 | oid = self.fs.put("hello", encoding="utf-8") |
| 414 | self.assertEqual(b"hello", (self.fs.get(oid)).read()) |
| 415 | self.assertEqual("utf-8", (self.fs.get(oid)).encoding) |
| 416 | |
| 417 | oid = self.fs.put("aé", encoding="iso-8859-1") |
| 418 | self.assertEqual("aé".encode("iso-8859-1"), (self.fs.get(oid)).read()) |
| 419 | self.assertEqual("iso-8859-1", (self.fs.get(oid)).encoding) |
| 420 | |
| 421 | def test_missing_length_iter(self): |
| 422 | # Test fix that guards against PHP-237 |