Logo Search packages:      
Sourcecode: mailping version File versions

test_fileutil.py

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)

Generated by  Doxygen 1.6.0   Back to index