From: Torsten Werner Date: Sun, 16 Jan 2011 17:19:44 +0000 (+0100) Subject: Add test for get_architecture_suites(). X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=99626b2f8ea34520cb7fe1aa20f665a8305224fc;p=dak.git Add test for get_architecture_suites(). Signed-off-by: Torsten Werner --- diff --git a/tests/dbtest_packages.py b/tests/dbtest_packages.py index f1ac75b8..97cc8b10 100755 --- a/tests/dbtest_packages.py +++ b/tests/dbtest_packages.py @@ -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()