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')
def test_delete_nonexistent(self): delve1 = JsonDelver(self.file1.name) delve2 = JsonDelver(self.file2.name) linked = ChainedDelver(delve1, delve2) linked.delete('/nonexistent')
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'))