I was adding Wingman's file-upload tests to the offline backend suite. Importing the bot could authenticate against Slack, so I patched that call before import. The fixture captures the registered file_shared handler, runs it with in-memory SQLite, and mocks the download, indexing and Slack calls. That leaves the real handler and text extraction in the test. Wingman upload fixtures
The successful text download goes through storage, indexing and the check-mark reaction. The HTTP 403 fixture exercises the early return.
I checked that the successful upload leaves one row with the file text and metadata, and that the mocked index call precedes the reaction. With a 403, there are zero rows, index calls or reactions. Both cases passed in the 313-test local backend run.