~ubuntu-branches/ubuntu/trusty/jockey/trusty

« back to all changes in this revision

Viewing changes to tests/oslib.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-03-08 16:08:06 UTC
  • mfrom: (2.1.31 upstream)
  • Revision ID: james.westby@ubuntu.com-20110308160806-udbldxcrfk734zsi
Tags: 0.9.2-0ubuntu1
* New upstream bug fix release:
  - Add X.org video driver ABI checking. (This was already cherrypicked
    in an earlier upload)
  - Drop our own verified_https.py and implement GPG fingerprint SSL
    checking with pycurl, which gets along with proxies. (LP: #729185)
  - Some code cleanup and more test cases.
* debian/control: Add python-pycurl dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import sandbox
25
25
import http
26
26
 
27
 
from jockey.verified_https import VerifiedHTTPSHandler, InvalidCertificateException
 
27
from jockey.detection import download_gpg_fingerprint
28
28
 
29
29
# fingerprint of tests/data/pubring.gpg
30
30
test_gpg_fp = '4EF8 3174 F985 6BD6 0E8D  584C 1A2E C5F3 E6B6 0077'
339
339
        if not cert:
340
340
            return self.skipTest('not available]')
341
341
 
342
 
        handler = VerifiedHTTPSHandler(ca_certs=cert)
343
 
        opener = urllib2.build_opener(handler)
344
 
        f = opener.open('https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint')
345
 
        self.assert_(f.readline().startswith('pub '))
346
 
        f.close()
 
342
        fp = download_gpg_fingerprint(
 
343
                'https://linux.avasys.jp/drivers/lsb/epson-inkjet/key/fingerprint')
 
344
        self.assertNotEqual(fp, None)
347
345
 
348
346
    def test_import_gpg_key_valid(self):
349
347
        '''import_gpg_key() for valid fingerprint'''