@@ -57,6 +57,7 @@ def _make_download(self, url, destination, cancel=False):
5757
5858 loop .exec_ ()
5959
60+ @unittest .skipIf (os .environ .get ('TRAVIS' , '' ) == 'true' , 'Test with http://www.qgis.org unstable. Needs local server.' )
6061 def test_validDownload (self ):
6162 """Tests a valid download"""
6263 destination = tempfile .mktemp ()
@@ -81,6 +82,7 @@ def test_inValidDownload(self):
8182 self .assertEqual (self .error_args [1 ], [u'Download failed: Host www.doesnotexistofthatimsure.qgis not found' ])
8283 self .assertFalse (os .path .isfile (destination ))
8384
85+ @unittest .skipIf (os .environ .get ('TRAVIS' , '' ) == 'true' , 'Test with http://www.github.com unstable. Needs local server.' )
8486 def test_dowloadCanceled (self ):
8587 """Tests user canceled download"""
8688 destination = tempfile .mktemp ()
@@ -101,6 +103,7 @@ def test_InvalidUrl(self):
101103 self .assertFalse (os .path .isfile (destination ))
102104 self .assertEqual (self .error_args [1 ], [u"Download failed: Protocol \" xyz\" is unknown" ])
103105
106+ @unittest .skipIf (os .environ .get ('TRAVIS' , '' ) == 'true' , 'Test with http://www.github.com unstable. Needs local server.' )
104107 def test_InvalidFile (self ):
105108 self ._make_download ('https://github.com/qgis/QGIS/archive/master.zip' , "" )
106109 self .assertTrue (self .exited_was_called )
@@ -132,6 +135,7 @@ def ssl_compare(self, name, url, error):
132135 result = ';' .join (result )
133136 self .assertTrue (result .startswith (error ), msg + "expected:\n %s\n actual:\n %s\n " % (result , error ))
134137
138+ @unittest .skipIf (os .environ .get ('TRAVIS' , '' ) == 'true' , 'Test with badssl.com unstable. Needs local server.' )
135139 def test_sslExpired (self ):
136140 self .ssl_compare ("expired" , "https://expired.badssl.com/" , "SSL Errors: ;The certificate has expired" )
137141 self .ssl_compare ("self-signed" , "https://self-signed.badssl.com/" , "SSL Errors: ;The certificate is self-signed, and untrusted" )
0 commit comments