def METHOD_NAME(self):
    try:
        old_umask = os.umask(0002)
        f = dumbdbm.open(_fname, 'c', 0637)
        f.close()
    finally:
        os.umask(old_umask)
    expected_mode = 0635
    if os.name != 'posix':
        # Windows only supports setting the read-only attribute.
        # This shouldn't fail, but doesn't work like Unix either.
        expected_mode = 0666
    import stat
    st = os.stat(_fname + '.dat')
    self.assertEqual(stat.S_IMODE(st.st_mode), expected_mode)
    st = os.stat(_fname + '.dir')
    self.assertEqual(stat.S_IMODE(st.st_mode), expected_mode)