Skip to content
Permalink
Browse files
adapt python blocking request test to contain a valid response after …
…server error

(cherry picked from commit 21540f2)
  • Loading branch information
nilsnolde authored and nyalldawson committed Apr 17, 2021
1 parent 296588c commit 12e6c2900ce8c3d1f2c04c7a903bb0c33a98b544
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/src/python/test_qgsblockingnetworkrequest.py
@@ -73,7 +73,7 @@ def testFetchBadUrl2(self):
self.assertIn('File not found', request.errorMessage())
reply = request.reply()
self.assertEqual(reply.error(), QNetworkReply.ContentNotFoundError)
self.assertFalse(reply.content())
self.assertEqual(reply.content(), '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\n "http://www.w3.org/TR/html4/strict.dtd">\n<html>\n <head>\n <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\n <title>Error response</title>\n </head>\n <body>\n <h1>Error response</h1>\n <p>Error code: 404</p>\n <p>Message: File not found.</p>\n <p>Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.</p>\n </body>\n</html>\n')

def testGet(self):
request = QgsBlockingNetworkRequest()

0 comments on commit 12e6c29

Please sign in to comment.