add mirrors.conf test
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
apache http://www.eu.apache.org/dist/
|
||||||
|
cpan http://search.cpan.org/CPAN/
|
||||||
|
cpan http://cpan.ulak.net.tr/
|
||||||
|
gnu http://ftp.gnu.org/gnu/
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Copyright (C) 2008, TUBITAK/UEKAE
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it under
|
||||||
|
# the terms of the GNU General Public License as published by the Free
|
||||||
|
# Software Foundation; either version 2 of the License, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# Please read the COPYING file.
|
||||||
|
#
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from pisi.mirrors import Mirrors
|
||||||
|
|
||||||
|
class MirrorsTestCase(unittest.TestCase):
|
||||||
|
def testGetMirrors(self):
|
||||||
|
mirrors = Mirrors("mirrors.conf")
|
||||||
|
assert ["http://www.eu.apache.org/dist/"] == mirrors.get_mirrors("apache")
|
||||||
|
assert ['http://search.cpan.org/CPAN/', 'http://cpan.ulak.net.tr/'] == mirrors.get_mirrors("cpan")
|
||||||
|
assert ["http://ftp.gnu.org/gnu/"] == mirrors.get_mirrors("gnu")
|
||||||
@@ -22,6 +22,7 @@ from database.filesdbtest import FilesDBTestCase
|
|||||||
from database.lazydbtest import LazyDBTestCase
|
from database.lazydbtest import LazyDBTestCase
|
||||||
from database.itembyrepotest import ItemByRepoTestCase
|
from database.itembyrepotest import ItemByRepoTestCase
|
||||||
from versiontest import VersionTestCase
|
from versiontest import VersionTestCase
|
||||||
|
from mirrorstest import MirrorsTestCase
|
||||||
|
|
||||||
suite = unittest.TestSuite()
|
suite = unittest.TestSuite()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user