falcony-io / sqlalchemy-searchable

Fulltext searchable models for SQLAlchemy. Only supports PostgreSQL
Other
262 stars 44 forks source link

test: rewrite test suite to use pytest fixtures #132

Closed jpvanhal closed 1 year ago

jpvanhal commented 1 year ago

Rewrite the test suite to use pytest fixtures ove classic xunit-style set-up. The fixture mechanism is more powerful and allows more modular and scalable approach for managing test state.

The tests for sync_trigger() and drop_trigger() were previously parametrized with create_test_cases() function to test the various search_trigger_name and search_trigger_function_name combinations. This did not have any effect because the tests were not passing them as options parameter to sync_trigger() and drop_trigger() functions. This is now fixed.

The Order model was removed from the tests. It was not used by any test case.