]> git.decadent.org.uk Git - dak.git/commitdiff
Drop unused function get_architecture_suites()
authorTollef Fog Heen <tfheen@varnish-software.com>
Wed, 9 Jan 2013 13:45:27 +0000 (14:45 +0100)
committerTollef Fog Heen <tfheen@err.no>
Tue, 10 Sep 2013 11:18:11 +0000 (13:18 +0200)
Not in use, and fixes a TODO item

Signed-off-by: Tollef Fog Heen <tfheen@varnish-software.com>
daklib/dbconn.py
tests/dbtest_packages.py

index e611d47df2106e9a084d0951b9e9b3b44710e57b..51a76c5a69f84f0bd4df54e00627c91ace223b41 100644 (file)
@@ -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):
index f258770983edbc6a7cc32459fda49c5b6e864833..73679b571c0fe0461b8d687daf6c967a0cab89b7 100755 (executable)
@@ -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())