Skip to content

Conversation

LuYanFCP
Copy link

@LuYanFCP LuYanFCP commented Nov 18, 2024

As a new open-source contributor, I recently encountered the same issue described in #1252 . I've created a simple patch to address this problem. fixes #1252

@vitalik
Copy link
Owner

vitalik commented Nov 22, 2024

Hi @LuYanFCP

The AsyncMock seems introduced in python 3.8+

I guess you can put custom async mock implementation (or just copy from 3.8) into https://github.com/vitalik/django-ninja/tree/master/ninja/compatibility folder and use it

@LuYanFCP
Copy link
Author

Hi @LuYanFCP

The AsyncMock seems introduced in python 3.8+

I guess you can put custom async mock implementation (or just copy from 3.8) into https://github.com/vitalik/django-ninja/tree/master/ninja/compatibility folder and use it

I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Mock Request Generated by Test Client Doesn’t Support auser()
2 participants