Skip to content

fix: correct NEO_DB singleton mock in gap_analysis test#757

Open
Subh24ai wants to merge 1 commit intoOWASP:mainfrom
Subh24ai:fix/gap-analysis-test-neo-db-mock
Open

fix: correct NEO_DB singleton mock in gap_analysis test#757
Subh24ai wants to merge 1 commit intoOWASP:mainfrom
Subh24ai:fix/gap-analysis-test-neo-db-mock

Conversation

@Subh24ai
Copy link

Problem

test_tiered_execution_optimization was failing with:
TypeError: NEO_DB.gap_analysis() missing 1 required positional argument: 'name_2'

This happened because the test called db.NEO_DB.gap_analysis() directly
on the class, but NEO_DB is a singleton that must be accessed via
NEO_DB.instance().

Fix

Updated setUp() to instantiate NEO_DB correctly using NEO_DB.instance()
and call gap_analysis() on the instance instead of the class.

Result

Test now passes without requiring a running Neo4j instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant