tortoise / tortoise/tortoise-orm

Sanic-Testing ReusableClient persists the data between instances

Open
#1,183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

Describe the bug
I have a Sanic server and I use sanic_testing for my tests.
More complex tests require the use of ReusableClient.

When I create multiple ReusableClients with the same app fixture, they retail data even after completely new instances of app is used.

To Reproduce
I will provide an example code later.

Expected behaviour
To not retain data across app instances.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation file or test is named. Start with a minimal reproduction using multiple sanic_testing ReusableClient instances and the same app fixture, then verify that a new app instance does not retain data after the clients are recreated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.