summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-02-14 22:45:11 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-02-14 22:45:11 -0600
commit3866f148dae1f6c90fc6d903784b65e452c048c6 (patch)
treeb4cae7a781b7f5a19ca1c726fe17c5392da35cbc /test
parentf923ab304017a71136642ed7b9780441edcaf441 (diff)
* Added debug action to generate_exclude_list_from_blacklist
* Added test data to test_pkginfo_from_rsync_output.py
Diffstat (limited to 'test')
-rw-r--r--test/test_pkginfo_from_rsync_output.py38
1 files changed, 27 insertions, 11 deletions
diff --git a/test/test_pkginfo_from_rsync_output.py b/test/test_pkginfo_from_rsync_output.py
index 81f14d9..5ed5dd8 100644
--- a/test/test_pkginfo_from_rsync_output.py
+++ b/test/test_pkginfo_from_rsync_output.py
@@ -11,7 +11,27 @@ from repm.config import *
from repm.filter import *
import unittest
-class KnownValues(unittest.TestCase):
+example_package_list=(Package(),Package(),Package())
+example_package_list[0].package_info={ "name" : "alex",
+ "version" : "2.3.4",
+ "release" : "1",
+ "arch" : "i686",
+ "license" : False,
+ "location": "community-staging/os/i686/alex-2.3.4-1-i686.pkg.tar.xz"}
+example_package_list[1].package_info={ "name" : "any2dvd",
+ "version" : "0.34",
+ "release" : "4",
+ "arch" : "any",
+ "license" : False,
+ "location": "community/os/any/any2dvd-0.34-4-any.pkg.tar.xz"}
+example_package_list[2].package_info={ "name" : "gmime22",
+ "version" : "2.2.26",
+ "release" : "1",
+ "arch" : "x86_64",
+ "license" : False,
+ "location": "community/os/x86_64/gmime22-2.2.26-1-x86_64.pkg.tar.xz"}
+
+class pkginfoFromRsyncOutput(unittest.TestCase):
try:
output_file = open("rsync_output_sample")
rsync_out= output_file.read()
@@ -26,19 +46,15 @@ class KnownValues(unittest.TestCase):
for pkg in self.pkglist:
self.assertIsInstance(pkg,Package)
- def testFirstPkg(self):
- first_package_info=Package()
- first_package_info.package_info={ "name" : "alex",
- "version" : "2.3.4",
- "release" : "1",
- "arch" : "i686",
- "license" : False,
- "location": "community-staging/os/i686/alex-2.3.4-1-i686.pkg.tar.xz"}
+ def testPackageInfo(self):
if self.pkglist:
first_package=self.pkglist[0]
else:
self.fail(self.pkglist)
- self.assertEqual(first_package,first_package_info)
-
+ self.assertEqual(first_package,example_package_list[0])
+
+class generateRsyncBlacklist(unittest.TestCase):
+ """ Test Blacklist generation """
+
if __name__ == "__main__":
unittest.main()