~wgrant/ubuntu/natty/landscape-client/natty-updates-broken

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hasenack
  • Date: 2011-03-01 15:38:11 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20110301153811-ow0pu4j068a9ysgo
Tags: 11.02-0ubuntu0.11.04.0
* New upstream version (LP: #727324)

  - Exit gracefully instead of crashing when the filesystem is
    read-only (LP: #649997).

  - Drop hal requirement (LP: #708502).

  - Enable HTTP compression in Curl (LP: #297623).

  - Explicitly name log files that need to be rotated (LP: #634236).

  - Assorted test suite fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                           pycurl.LOW_SPEED_TIME: 600,
95
95
                           pycurl.NOSIGNAL: 1,
96
96
                           pycurl.WRITEFUNCTION: Any(),
97
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
97
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
98
                           pycurl.ENCODING: "gzip,deflate"})
98
99
 
99
100
    def test_post(self):
100
101
        curl = CurlStub("result")
110
111
                           pycurl.NOSIGNAL: 1,
111
112
                           pycurl.WRITEFUNCTION: Any(),
112
113
                           pycurl.POST: True,
113
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
114
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
115
                           pycurl.ENCODING: "gzip,deflate"})
114
116
 
115
117
    def test_post_data(self):
116
118
        curl = CurlStub("result")
129
131
                           pycurl.POST: True,
130
132
                           pycurl.POSTFIELDSIZE: 4,
131
133
                           pycurl.READFUNCTION: Any(),
132
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
134
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
135
                           pycurl.ENCODING: "gzip,deflate"})
133
136
 
134
137
    def test_cainfo(self):
135
138
        curl = CurlStub("result")
145
148
                           pycurl.NOSIGNAL: 1,
146
149
                           pycurl.WRITEFUNCTION: Any(),
147
150
                           pycurl.CAINFO: "cainfo",
148
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
151
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
152
                           pycurl.ENCODING: "gzip,deflate"})
149
153
 
150
154
    def test_cainfo_on_http(self):
151
155
        curl = CurlStub("result")
168
172
                           pycurl.NOSIGNAL: 1,
169
173
                           pycurl.WRITEFUNCTION: Any(),
170
174
                           pycurl.HTTPHEADER: ["a: 1", "b: 2"],
171
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
175
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
176
                           pycurl.ENCODING: "gzip,deflate"})
172
177
 
173
178
    def test_timeouts(self):
174
179
        curl = CurlStub("result")
184
189
                           pycurl.LOW_SPEED_TIME: 30,
185
190
                           pycurl.NOSIGNAL: 1,
186
191
                           pycurl.WRITEFUNCTION: Any(),
187
 
                           pycurl.DNS_CACHE_TIMEOUT: 0})
 
192
                           pycurl.DNS_CACHE_TIMEOUT: 0,
 
193
                           pycurl.ENCODING: "gzip,deflate"})
188
194
 
189
195
    def test_unicode(self):
190
196
        """
255
261
                               pycurl.LOW_SPEED_TIME: 600,
256
262
                               pycurl.NOSIGNAL: 1,
257
263
                               pycurl.WRITEFUNCTION: Any(),
258
 
                               pycurl.DNS_CACHE_TIMEOUT: 0})
 
264
                               pycurl.DNS_CACHE_TIMEOUT: 0,
 
265
                               pycurl.ENCODING: "gzip,deflate"})
259
266
        finally:
260
267
            pycurl.Curl = Curl
261
268