OpenSlides / OpenSlides/openslides-backend
[relDB] Tests: get db connection in a cleaner way
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9
- Forks
- 40
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 19
Description
See tests/conftest.py db_connection function
The BaseSystemTestCase Classes connection attribute is filled from the outside currently. Filling a class variable from the outside seems a bit improper. We should probably change that at some point
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/conftest.py and its db_connection function, then trace how BaseSystemTestCase.connection is assigned from outside. Determine a cleaner way for the test classes to obtain the database connection without external class-variable filling. Done means the existing database-backed tests still run with connection setup contained in the test infrastructure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100