tests: Lots of fixes

Thanks to the great work done by Gökhan Göktürk.
This commit is contained in:
Fatih Aşıcı
2010-07-11 08:45:48 +00:00
parent 3782c3bcf0
commit 1593858786
19 changed files with 99 additions and 100 deletions
+4 -13
View File
@@ -9,10 +9,9 @@ class FileTestCase(unittest.TestCase):
unittest.TestCase.setUp(self)
def testMakeUri(self):
self.spec = SpecFile()
self.url = uri.URI(self.spec.source.archive.uri)
f = File('repos/pardus-2007/system/base/curl/pspec.xml', File.read)
self.assert_(f.make_uri('uri'))
spec = SpecFile("repos/pardus-2007/system/base/curl/pspec.xml")
url = uri.URI(spec.source.archive[0].uri)
self.assert_(File.make_uri(url))
def testChooseMethod(self):
compress = File('repos/contrib-2007/pisi-index.xml.bz2', File.read)
@@ -28,16 +27,8 @@ class FileTestCase(unittest.TestCase):
r = f.readlines()
assert (len(r) > 0)
def testIsatty(self):
f = File('repos/pardus-2007/system/base/curl/pspec.xml', File.read)
assert not f.isatty()
def testFileNo(self):
f = File('repos/pardus-2007/system/base/curl/pspec.xml', File.read)
assert not 3 == f.fileno()
def testRemoteRead(self):
f = File('http://uludag.org.tr/bulten/index.html', File.read)
f = File('http://www.pardus.org.tr/urunler/pardus-2009.2-Geronticus_eremita-surum-notlari-tr.html', File.read)
r = f.readlines()
assert (len(r) > 0)