~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/googlesearch/tests/test_google.py

  • Committer: William Grant
  • Date: 2011-12-30 08:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 14611.
  • Revision ID: william.grant@canonical.com-20111230081314-f73f4ozgkzdi5xqb
More stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    URLError,
12
12
    )
13
13
 
14
 
from canonical.lazr.timeout import TimeoutError
15
 
from lp.testing.layers import FunctionalLayer
16
14
from lp.services.googlesearch import GoogleSearchService
17
15
from lp.services.googlesearch.interfaces import GoogleResponseError
 
16
from lp.services.timeout import TimeoutError
18
17
from lp.testing import TestCase
 
18
from lp.testing.layers import FunctionalLayer
19
19
 
20
20
 
21
21
@contextmanager
29
29
    def raise_exception(url):
30
30
        raise test_error(*args)
31
31
 
32
 
    from canonical.lazr import timeout
 
32
    from lp.services import timeout
33
33
    original_urlfetch = timeout.urlfetch
34
34
    timeout.urlfetch = raise_exception
35
35
    try: