/usr/share/python-support/mailping/MailPing/test/test_fileutil.py is in mailping 0.0.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from twisted.trial import unittest
import os, sets
from MailPing import fileutil
class TestFileUtil(unittest.TestCase):
def testTimestampRead(self):
filename = self.mktemp()
f=file(filename, 'w')
f.write('42\n')
f.close()
self.assertEquals(fileutil.getTime(filename), 42)
def testTimestampReadFail(self):
filename = self.mktemp()
self.assertEquals(fileutil.getTime(filename), -1)
|