This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
559-endpoint-log-events - Adds middleware for calling analytics events for each endpoint #622
559-endpoint-log-events - Adds middleware for calling analytics events for each endpoint #622
Changes from 1 commit
2a4dd72
aa9dde6
a97f1d0
da6e363
6efda7b
5bf8937
f57d6df
3810e85
358ad7c
70633a9
4e950c7
e385ebd
3d0480d
d768f13
ca8c37e
8d2c3e8
26ce57e
1b1af46
4c661c9
f3baadf
1cac354
8f9d1e2
53f414e
e95ca1d
362acd1
0397684
c5e7143
0a8f94b
1ec7db7
8adf0e6
a07880a
209c971
8cda76a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pattisdr I'm unsure if you'd have any pointers here, but I'm struggling to mock the return of an async function, while also preserving the
BackgroundTask
that is added to the response here- 53f414e#diff-51868caf44d288309a19f7b59360f148adfa01226f70bf528441cef723439ffcR57Currently, this code will fail at
send_analytics_request_mock.assert_called_once_with()
because the background task is not getting added properly using this async mock.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you tried AsyncMocks? https://docs.python.org/3.8/library/unittest.mock.html#unittest.mock.AsyncMock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checking this out!