Skip to content

Commit

Permalink
adapt python blocking request test to contain a valid response after …
Browse files Browse the repository at this point in the history
…server error

(cherry picked from commit 21540f2)
  • Loading branch information
nilsnolde authored and nyalldawson committed Apr 17, 2021
1 parent 296588c commit 12e6c29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsblockingnetworkrequest.py
Expand Up @@ -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()
Expand Down

0 comments on commit 12e6c29

Please sign in to comment.