From: Tollef Fog Heen Date: Wed, 9 Jan 2013 13:45:27 +0000 (+0100) Subject: Drop unused function get_architecture_suites() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9eb56484947644070f33383685a2bf288795139;p=dak Drop unused function get_architecture_suites() Not in use, and fixes a TODO item Signed-off-by: Tollef Fog Heen --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index e611d47d..51a76c5a 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -433,27 +433,6 @@ def get_architecture(architecture, session=None): __all__.append('get_architecture') -# TODO: should be removed because the implementation is too trivial -@session_wrapper -def get_architecture_suites(architecture, session=None): - """ - Returns list of Suite objects for given C{architecture} name - - @type architecture: str - @param architecture: Architecture name to search for - - @type session: Session - @param session: Optional SQL session object (a temporary one will be - generated if not supplied) - - @rtype: list - @return: list of Suite objects for the given name (may be empty) - """ - - return get_architecture(architecture, session).suites - -__all__.append('get_architecture_suites') - ################################################################################ class Archive(object): diff --git a/tests/dbtest_packages.py b/tests/dbtest_packages.py index f2587709..73679b57 100755 --- a/tests/dbtest_packages.py +++ b/tests/dbtest_packages.py @@ -60,13 +60,6 @@ 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) # check overrides self.assertEqual(0, self.suite['lenny'].overrides.count())