~james-w/udd/management-commands

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from udd import (
    iconfig,
    tests,
    )

from udd.scripts import list_packages


class TestListPackages(tests.TestCaseWithConfig):

    def test_empty(self):
        # FIXME: this query the real launchpad which we can't afford as it's
        # too long for testing -- vila 2011-12-09
        raise self.skip("Needs a faked launchpad"
                        " or a severely reduced selection")
        # Nevertheless, I've completed a succesful run of this test which
        # created > 11.500 requests to lp (observed in the /tmp dir used for
        # caching the responses), created a > 7M packages.db and took > 4 hours
        # (which first triggered the new bzr alarm protection against hung
        # tests which I overrided in bazaar.conf with selftest.timeout =
        # 60000), pfew, not a test you want (nor can) run repeatedly :-/ --
        # vila 2011-12-09
        list_packages.main()
        # A lock has been created under the test hierarchy
        self.assertTestPathExists('locks/scripts/list_packages')