code: def test_write_readonly_file(self):
      with gdbm.open(filename, "c") as db:
          db[b"bytes key"] = b"bytes value"
      with gdbm.open(filename, "r") as db:
          with self.assertRaises(gdbm.error):
              del db[b"not exist key"]
          with self.assertRaises(gdbm.error):
              del db[b"bytes key"]
          with self.assertRaises(gdbm.error):
              db[b"not exist key"] = b"not exist value"
  
imports: from test import support
  from test.support import import_helper, cpython_only
  import unittest
  import os
  from test.support.os_helper import TESTFN, TESTFN_NONASCII, unlink, FakePath
label_desc: Use image node_id 15 for calling the TestGdbm obj's underlying member method code with example usage: obj.test_write_readonly_file() without return types