__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):
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())