pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

"rf" alias to "request_factory" (or vice versa)

Open benjaoming opened this issue 2 months ago • 2 comments

Fixtures are already a bit of an obscure concept for people new to Pytest. And as in the good old saying goes... "readability counts".

(suggesting to keep rf, no need for a hamster wheel update of a bunch of test cases, that will just make a lot of people feel miserable)

By the way, thanks for a great project 💟

benjaoming avatar Nov 03 '25 13:11 benjaoming

This was a run through time, it looks like its been like rf since the initial commit. Funny that.

You're not wrong. Remember you can add this to your code:

@pytest.fixture
def request_factory(rf):
    return rf

kingbuzzman avatar Nov 04 '25 12:11 kingbuzzman

@bluetech any thoughts on this?

kingbuzzman avatar Nov 05 '25 09:11 kingbuzzman