(self)
| 383 | @unittest.skipIf(mswindows, "windows file permissions are incompatible with file modes") |
| 384 | @os_helper.skip_unless_working_chmod |
| 385 | def test_lwp_filepermissions(self): |
| 386 | # Cookie file should only be readable by the creator |
| 387 | filename = os_helper.TESTFN |
| 388 | c = LWPCookieJar() |
| 389 | interact_netscape(c, "http://www.acme.com/", 'boo') |
| 390 | try: |
| 391 | c.save(filename, ignore_discard=True) |
| 392 | st = os.stat(filename) |
| 393 | self.assertEqual(stat.S_IMODE(st.st_mode), 0o600) |
| 394 | finally: |
| 395 | os_helper.unlink(filename) |
| 396 | |
| 397 | @unittest.skipIf(mswindows, "windows file permissions are incompatible with file modes") |
| 398 | @os_helper.skip_unless_working_chmod |
nothing calls this directly
no test coverage detected