feat: Add CD001-TOOLS-001 — Tools Unit Tests (CD001, #27)#227
Open
steadhac wants to merge 1 commit intoGenAI-Security-Project:mainfrom
Open
feat: Add CD001-TOOLS-001 — Tools Unit Tests (CD001, #27)#227steadhac wants to merge 1 commit intoGenAI-Security-Project:mainfrom
steadhac wants to merge 1 commit intoGenAI-Security-Project:mainfrom
Conversation
d9282ab to
dc6cf52
Compare
Adds 162 unit tests across 3 new test modules: - tests/unit/tools/ — test_fraud.py, test_vendor.py , test_invoice.py - tests/unit/plugins/ — Google Sheets reporter
dc6cf52 to
89ca0ac
Compare
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a comprehensive unit test suite for the fraud detection, vendor management, and
invoice management tool layers used by the fraud detection agent. Tests cover all
core functions across 3 tool modules — risk profiling, vendor status updates, invoice
status updates, and agent notes management.
Bug-exposing tests document confirmed production defects: None inputs written as literal
"None", arbitrary risk/status/trust level values accepted without validation, and
unclosed DB sessions on exception.
Tests follow the established pattern with:
📁 Test Files
tests/unit/tools/test_fraud.py
tests/unit/tools/test_vendor.py
tests/unit/tools/test_invoice.py
TestGetVendorRiskProfile
TestGetVendorInvoices
TestUpdateVendorRisk
TestFlagInvoiceForReview
TestUpdateFraudAgentNotes
TestGetVendorRiskProfileDefects⚠️
TestGetVendorDetails
TestGetVendorContactInfo
TestUpdateVendorStatus
TestGetVendorDetailsDefects⚠️
TestUpdateVendorAgentNotes
TestGetInvoiceDetails
TestUpdateInvoiceStatus
TestUpdateInvoiceAgentNotes
TestGetInvoiceDetailsDefects⚠️