def METHOD_NAME(self):
    nonexisting_file = 'nonexisting-file'
    with self.assertRaises(gdbm.error) as cm:
        gdbm.open(nonexisting_file)
    self.assertIn(nonexisting_file, str(cm.exception))
    self.assertEqual(cm.exception.filename, nonexisting_file)