~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/views.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-22 19:59:40 UTC
  • mfrom: (13992.1.4 yuixhr)
  • Revision ID: launchpad@pqm.canonical.com-20110922195940-7y8d2fzivvo7fuoy
[r=deryck][bug=724609][no-qa][incr] Add the ability to write app
        integration tests with YUI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
__all__ = [
8
8
    'create_view',
9
9
    'create_initialized_view',
10
 
    'YUITestFileView',
11
10
    ]
12
11
 
13
 
import os
14
 
 
15
12
from zope.component import (
16
13
    getMultiAdapter,
17
14
    getUtility,
21
18
    newInteraction,
22
19
    )
23
20
 
24
 
from canonical.config import config
25
21
from canonical.launchpad.layers import setFirstLayer
26
22
from canonical.launchpad.webapp.servers import WebServiceTestRequest
27
23
from canonical.launchpad.webapp.interfaces import (
30
26
    )
31
27
from canonical.launchpad.webapp.publisher import layer_for_rootsite
32
28
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
33
 
from canonical.lazr import ExportedFolder
34
29
 
35
30
 
36
31
def create_view(context, name, form=None, layer=None, server_url=None,
102
97
    return view
103
98
 
104
99
 
105
 
class YUITestFileView(ExportedFolder):
106
 
    """Export the lib directory where the test assets reside."""
107
 
 
108
 
    folder = os.path.join(config.root, 'lib/')
109
 
    export_subdirectories = True
110
 
 
111
 
 
112
100
def create_webservice_error_view(error):
113
101
    """Return a view of the error with a webservice request."""
114
102
    request = WebServiceTestRequest()