From 99626b2f8ea34520cb7fe1aa20f665a8305224fc Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sun, 16 Jan 2011 18:19:44 +0100 Subject: [PATCH] Add test for get_architecture_suites(). Signed-off-by: Torsten Werner --- tests/dbtest_packages.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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() -- 2.39.5