Пример #1
0
 def test_delete_readonly(self):
     delve1 = JsonDelver(self.file1.name)
     delve2 = JsonDelver(self.file2.name, readonly=True)
     linked = ChainedDelver(delve1, delve2)
     with self.assertRaises(ReadonlyError):
         linked.delete('/list')
Пример #2
0
 def test_delete_nonexistent(self):
     delve1 = JsonDelver(self.file1.name)
     delve2 = JsonDelver(self.file2.name)
     linked = ChainedDelver(delve1, delve2)
     linked.delete('/nonexistent')
Пример #3
0
 def test_delete(self):
     delve1 = JsonDelver(self.file1.name)
     delve2 = JsonDelver(self.file2.name)
     linked = ChainedDelver(delve1, delve2)
     linked.delete('/list')
     self.assertIsNone(linked.get('/list'))