test: pin the staticmethod and classmethod unwrap of a backend's aresolve

Open Beginner friendly
#119 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
django, python
Domain
backend

Research direction

Start by reading _principal._function and the backend tests in test_naming.py and test_principal_backends.py, which the issue identifies. Add coverage for backends whose aresolve is an async function wrapped with staticmethod and classmethod; done means both build without a coroutine-function refusal.

Written by the indexing model from the issue text.

Description

_principal._function unwraps a staticmethod or classmethod before it checks whether resolve/aresolve is a coroutine function (#100). No test pins that unwrap: removing it leaves test_naming.py and test_principal_backends.py green, yet an async aresolve written as a staticmethod would then be refused as "not a coroutine function".

Add a backend with aresolve = staticmethod(async_fn) and one with a classmethod, and assert both build with no refusal.

Follow-up from review of #100 (non-blocking).

Dominant language
Python
Stars
1
Forks
0
Avg merge
5h 30m
Merged PRs (30d)
85

Getting set up

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.

More from stack314/django-neolith

All issues in stack314/django-neolith

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.