Skip to content

Refactor duplicated quota limiter tests in test_dump_configuration.py #932

@coderabbitai

Description

@coderabbitai

Description

Test duplication has been identified in tests/unit/models/config/test_dump_configuration.py. The tests test_dump_configuration_with_quota_limiters and test_dump_configuration_with_quota_limiters_different_values duplicate approximately 210 lines of code, differing only in three scheduler parameters.

Details

  • File: tests/unit/models/config/test_dump_configuration.py
  • Tests affected:
    • test_dump_configuration_with_quota_limiters
    • test_dump_configuration_with_quota_limiters_different_values
  • Issue: These tests share identical structure and assertions, varying only in the scheduler configuration parameters (database_reconnection_count and database_reconnection_delay)

Recommendation

Consider refactoring these tests using pytest parametrization to eliminate duplication and improve maintainability.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions