~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/tests/test_publication.py

  • Committer: Francis J. Lacoste
  • Date: 2011-07-14 21:49:37 UTC
  • mto: This revision was merged to the branch mainline in revision 13501.
  • Revision ID: francis.lacoste@canonical.com-20110714214937-redwzax7e3ti1wxe
Lint sucks, but hoover blows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        """
47
47
        # This method is completely out of control.  Thanks, Zope.
48
48
        name = '+' + self.factory.getUniqueString()
 
49
 
49
50
        class new_class(simple):
50
51
            def __init__(self, context, request):
51
52
                self.context = context
55
56
            required[n] = CheckerPublic
56
57
        defineChecker(new_class, Checker(required))
57
58
        getSiteManager().registerAdapter(
58
 
            new_class, (ILaunchpadRoot, IDefaultBrowserLayer), Interface, 
 
59
            new_class, (ILaunchpadRoot, IDefaultBrowserLayer), Interface,
59
60
            name)
60
61
        self.addCleanup(
61
62
            getSiteManager().unregisterAdapter, new_class,
76
77
        # traversal in the sense of get_current_browser_request.
77
78
        login(ANONYMOUS)
78
79
        requests = []
 
80
 
79
81
        def record_current_request():
80
82
            requests.append(get_current_browser_request())
81
83
        context, view, request = test_traverse(
98
100
        person = self.factory.makePerson()
99
101
        login_person(person)
100
102
        users = []
 
103
 
101
104
        def record_user():
102
105
            users.append(getUtility(ILaunchBag).user)
103
106
        context, view, request = test_traverse(