Find a way to test FCGI stuff... #8

Open
opened 2019-08-08 13:28:10 +02:00 by yannweb · 0 comments
Owner

Functions using libfcgi stuff are more complicated to test. For example :

The libpyfcgi.IoIn class allows worker to read HTTP data from an RawIo interface. This class is written in C and calls FCGX_* functions to read data from FCGX_Stream* returned by FCGX_Accept....

A way to test all this stuff is to create a valid FCGI context. Maybe with a dummy HTTP server sending FCGI requests to the test programm.... Or by re-defining/mocking all FCGX_* functions.... (the second solution seems the simplest/better one)

Functions using libfcgi stuff are more complicated to test. For example : The libpyfcgi.IoIn class allows worker to read HTTP data from an RawIo interface. This class is written in C and calls FCGX_* functions to read data from FCGX_Stream* returned by FCGX_Accept.... A way to test all this stuff is to create a valid FCGI context. Maybe with a dummy HTTP server sending FCGI requests to the test programm.... Or by re-defining/mocking all FCGX_* functions.... (the second solution seems the simplest/better one)
yannweb added this to the BETA version milestone 2019-08-08 13:28:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yannweb/PyFCGI#8
No description provided.