[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior ___ Python tracker ___

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Phani Kumar Yadavilli
Phani Kumar Yadavilli added the comment: Sure, will do that. Regards Phani kumar yadavilli On Fri, Aug 27, 2021 at 7:54 PM Karthikeyan Singaravelan < rep...@bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > AsyncMock is a feature of Python 3.8 . Please upgrade to

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: AsyncMock is a feature of Python 3.8 . Please upgrade to Python 3.8 or use mock backport for AsyncMock in Python 3.7 https://github.com/testing-cabal/mock . I guess this can be closed as not a bug. --

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Phani Kumar Yadavilli
Phani Kumar Yadavilli added the comment: I am using python 3.7. Regards Phani kumar yadavilli On Fri, Aug 27, 2021 at 7:49 PM Karthikeyan Singaravelan < rep...@bugs.python.org> wrote: > > Karthikeyan Singaravelan added the comment: > > What version of Python are you using? > > -- >

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: What version of Python are you using? -- ___ Python tracker ___ ___ Python-bugs-list

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Phani Kumar Yadavilli
Phani Kumar Yadavilli added the comment: from unittest import mock @mock.patch( "project.celerytasks.embedder.BulkEmbedder.fetch_embedding", mock.AsyncMock(return_value=embedding_response), ) def test_document_embedding(): doc = { "orgId": "orgtest" } doc =

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please add a sample script to reproduce the problem. It will be also helpful to add how you run the script and also attach the error message you are getting. Given that you have selected Python 3.7 version AsyncMock was added in Python 3.8

[issue45028] module 'unittest.mock' has no attribute 'AsyncMock'

2021-08-27 Thread Phani Kumar Yadavilli
New submission from Phani Kumar Yadavilli : The unittest.mock does not have AsyncMock. I tested the same code in 3.9 it works fine. -- messages: 400400 nosy: wandermonk priority: normal severity: normal status: open title: module 'unittest.mock' has no attribute 'AsyncMock' type: