~ubuntu-branches/ubuntu/trusty/landscape-client/trusty-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-04-07 16:27:45 UTC
  • mfrom: (1.1.14 upstream) (24.1.1 karmic-proposed)
  • Revision ID: james.westby@ubuntu.com-20100407162745-oeyoppvl0qyvii55
Tags: 1.5.0-0ubuntu0.10.04.0
* New upstream version (LP: #557244)
  - Fix package-changer running before smart-update has completed (LP: #542215)
  - Report the version of Eucalyptus used to generate topology data (LP: #554007)
  - Enable the Eucalyptus plugin by default, if supported (LP: #546531)
  - Use a whitelist of allowed filesystem types to instead of a blacklist (LP: #351927)
  - Report the update-manager logs to the server (LP: #503384)
  - Turn off Curl's DNS caching for requests. (LP: #522688)

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
                           pycurl.LOW_SPEED_LIMIT: 1,
94
94
                           pycurl.LOW_SPEED_TIME: 600,
95
95
                           pycurl.NOSIGNAL: 1,
96
 
                           pycurl.WRITEFUNCTION: Any()})
 
96
                           pycurl.WRITEFUNCTION: Any(),
 
97
                           pycurl.DNS_CACHE_TIMEOUT: 0})
97
98
 
98
99
    def test_post(self):
99
100
        curl = CurlStub("result")
108
109
                           pycurl.LOW_SPEED_TIME: 600,
109
110
                           pycurl.NOSIGNAL: 1,
110
111
                           pycurl.WRITEFUNCTION: Any(),
111
 
                           pycurl.POST: True})
 
112
                           pycurl.POST: True,
 
113
                           pycurl.DNS_CACHE_TIMEOUT: 0})
112
114
 
113
115
    def test_post_data(self):
114
116
        curl = CurlStub("result")
126
128
                           pycurl.WRITEFUNCTION: Any(),
127
129
                           pycurl.POST: True,
128
130
                           pycurl.POSTFIELDSIZE: 4,
129
 
                           pycurl.READFUNCTION: Any()})
 
131
                           pycurl.READFUNCTION: Any(),
 
132
                           pycurl.DNS_CACHE_TIMEOUT: 0})
130
133
 
131
134
    def test_cainfo(self):
132
135
        curl = CurlStub("result")
141
144
                           pycurl.LOW_SPEED_TIME: 600,
142
145
                           pycurl.NOSIGNAL: 1,
143
146
                           pycurl.WRITEFUNCTION: Any(),
144
 
                           pycurl.CAINFO: "cainfo"})
 
147
                           pycurl.CAINFO: "cainfo",
 
148
                           pycurl.DNS_CACHE_TIMEOUT: 0})
145
149
 
146
150
    def test_cainfo_on_http(self):
147
151
        curl = CurlStub("result")
163
167
                           pycurl.LOW_SPEED_TIME: 600,
164
168
                           pycurl.NOSIGNAL: 1,
165
169
                           pycurl.WRITEFUNCTION: Any(),
166
 
                           pycurl.HTTPHEADER: ["a: 1", "b: 2"]})
 
170
                           pycurl.HTTPHEADER: ["a: 1", "b: 2"],
 
171
                           pycurl.DNS_CACHE_TIMEOUT: 0})
167
172
 
168
173
    def test_timeouts(self):
169
174
        curl = CurlStub("result")
178
183
                           pycurl.LOW_SPEED_LIMIT: 1,
179
184
                           pycurl.LOW_SPEED_TIME: 30,
180
185
                           pycurl.NOSIGNAL: 1,
181
 
                           pycurl.WRITEFUNCTION: Any()})
 
186
                           pycurl.WRITEFUNCTION: Any(),
 
187
                           pycurl.DNS_CACHE_TIMEOUT: 0})
182
188
 
183
189
    def test_unicode(self):
184
190
        """
247
253
                               pycurl.LOW_SPEED_LIMIT: 1,
248
254
                               pycurl.LOW_SPEED_TIME: 600,
249
255
                               pycurl.NOSIGNAL: 1,
250
 
                               pycurl.WRITEFUNCTION: Any()})
 
256
                               pycurl.WRITEFUNCTION: Any(),
 
257
                               pycurl.DNS_CACHE_TIMEOUT: 0})
251
258
        finally:
252
259
            pycurl.Curl = Curl
253
260