]> err.no Git - dak/commitdiff
Add test for get_architecture_suites().
authorTorsten Werner <twerner@debian.org>
Sun, 16 Jan 2011 17:19:44 +0000 (18:19 +0100)
committerTorsten Werner <twerner@debian.org>
Sun, 16 Jan 2011 17:19:44 +0000 (18:19 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/dbtest_packages.py

index f1ac75b89b1c35c495648c50be03adf991168767..97cc8b10cacd497c9968b4dff70a15c70c8b9a3e 100755 (executable)
@@ -2,7 +2,8 @@
 
 from db_test import DBDakTestCase
 
-from daklib.dbconn import Architecture, Suite, get_suite_architectures
+from daklib.dbconn import Architecture, Suite, get_suite_architectures, \
+    get_architecture_suites
 
 import unittest
 
@@ -81,6 +82,13 @@ class PackageTestCase(DBDakTestCase):
         architectures = get_suite_architectures('lenny', skipall = True, session = self.session)
         self.assertEqual(3, len(architectures))
         self.assertTrue(self.arch['all'] not in architectures)
+        # check the function get_architecture_suites()
+        suites = get_architecture_suites('i386', self.session)
+        self.assertEqual(3, len(suites))
+        self.assertTrue(self.suite['lenny'] in suites)
+        suites = get_architecture_suites('kfreebsd-i386', self.session)
+        self.assertEqual(2, len(suites))
+        self.assertTrue(self.suite['lenny'] not in suites)
 
 if __name__ == '__main__':
     unittest.main()