~ubuntu-branches/ubuntu/natty/landscape-client/natty

« back to all changes in this revision

Viewing changes to landscape/lib/tests/test_fetch.py

  • Committer: Bazaar Package Importer
  • Author(s): Christopher Armstrong
  • Date: 2009-02-11 17:00:54 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090211170054-aqux5yjpjwzo8ss8
Tags: 1.0.26-0ubuntu0.9.04
New upstream release (LP: #328151)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import pycurl
2
2
 
3
 
from landscape.lib.fetch import fetch
 
3
from landscape.lib.fetch import fetch, fetch_async
4
4
from landscape.tests.helpers import LandscapeTest
5
5
 
6
6
 
113
113
                               pycurl.WRITEFUNCTION: Any()})
114
114
        finally:
115
115
            pycurl.Curl = Curl
 
116
 
 
117
    def test_async_fetch(self):
 
118
        curl = CurlStub("result")
 
119
        d = fetch_async("http://example.com/", curl=curl)
 
120
        def got_result(result):
 
121
            self.assertEquals(result, "result")
 
122
        return d.addCallback(got_result)
 
123