import ftp import unittest class FtpUploadTest unittest TestCase def s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import ftp
import unittest
class FtpUploadTest(unittest.TestCase):
def svnlook(self, what, rev, repos):
f=os.popen("""/usr/bin/svnlook %s -r %s %s""" % (what, rev,repos), "r")
lines = f.readlines()
f.close()
return lines
def setUp(self):
self.ftp = FtpUpload()
self.files = self.svnlook('files-changed', 45, '/home/alex/repos')
def testUpload(self):
f = FtpUpload()
self.assertEqual(f.upload(self.files), 2)
if __name__ == "__main__":
unittest.main()