Skip to content

Commit

Permalink
Remove nonfunctional test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 26, 2022
1 parent 7d9eaa0 commit 123fc52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgsnetworkaccessmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,12 +587,12 @@ void TestQgsNetworkAccessManager::fetchPostMultiPart()

void TestQgsNetworkAccessManager::fetchPostMultiPart_data()
{
QTest::addColumn<int>( "contentType" );
QTest::addColumn<int>( "iContentType" );

QTest::newRow( "MixedType" ) << QHttpMultiPart::MixedType;
QTest::newRow( "FormDataType" ) << QHttpMultiPart::FormDataType;
QTest::newRow( "RelatedType" ) << QHttpMultiPart::FormDataType;
QTest::newRow( "AlternativeType" ) << QHttpMultiPart::FormDataType;
QTest::newRow( "MixedType" ) << static_cast<int>( QHttpMultiPart::MixedType );
QTest::newRow( "FormDataType" ) << static_cast<int>( QHttpMultiPart::FormDataType );
QTest::newRow( "RelatedType" ) << static_cast<int>( QHttpMultiPart::FormDataType );
QTest::newRow( "AlternativeType" ) << static_cast<int>( QHttpMultiPart::FormDataType );
}

void TestQgsNetworkAccessManager::fetchBadSsl()
Expand Down
36 changes: 0 additions & 36 deletions tests/src/python/test_qgsaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,42 +64,6 @@ def _req_logger(self, params):

self.assertEqual(self.body, br"a%26%2Bb=a%20and%20plus%20b&a%3Db=a%20equals%20b")

# TEST DISABLED
# NONFUNCTIONAL

# def test_post_multipart_action(self):
# """Test multipart"""
#
# self.body = None
#
# def _req_logger(self, params):
# self.body = bytes(params.content())
#
# QgsNetworkAccessManager.instance().requestAboutToBeCreated[QgsNetworkRequestParameters].connect(partial(_req_logger, self))
#
# temp_dir = QTemporaryDir()
# temp_path = temp_dir.path()
# temp_file = os.path.join(temp_path, 'multipart.txt')
#
# action = QgsAction(QgsAction.SubmitUrlMultipart, 'url_encoded', "http://fake_qgis_http_endpoint" + temp_file + r"?[% url_encode(map('a&+b', 'a and plus b', 'a=b', 'a equals b')) %]")
# ctx = QgsExpressionContext()
# action.run(ctx)
#
# while not self.body:
# QgsApplication.instance().processEvents()
#
# self.assertEqual(re.sub(r'\.oOo\.[^\r]*', '.oOo.UUID', self.body.decode('utf8')), '\r\n'.join([
# '--boundary_.oOo.UUID',
# 'Content-Disposition: form-data; name="a&+b"',
# '',
# 'a and plus b',
# '--boundary_.oOo.UUID',
# 'Content-Disposition: form-data; name="a=b"',
# '',
# 'a equals b',
# '--boundary_.oOo.UUID',
# '']))


if __name__ == '__main__':
unittest.main()

0 comments on commit 123fc52

Please sign in to comment.