-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add integration test for DeepL feature #2136
Comments
I faced 2 issues:
|
What do you think about patch the |
I assumed we want to do it through the mocked DeepL API. But to implement it in such way, the mocked server should be started before the CMS.
In this case we won't cover the load of supported languages. |
I discovered another strange problem: If I use AsyncClient(), tests are failing on this request:
Response code is 200, and response content is fine itself. Error: What is particularly odd:
@timoludwig can you see any leads here? 🙈 |
@seluianova very strange indeed 🤔 I also don't know where the date is coming from, in theory the bulk action should only modify the translation objects and not the content objects. I don't see a place where |
Actually this error occurs even before the DeepL translation
I believe we can :) |
So. Assuming that the problem is in AsyncClient(), I could make these tests synchronized by replacing async aiohttp_raw_server with sync pytest-httpserver for DeepL mock. (https://pypi.org/project/pytest-httpserver/#description) @timoludwig do you have any objections if I make the summ_ai tests synchronized the same way for consistency? |
Ok, seems reasonable.
The problem is that the SUMM.AI client only works in async context, so I'm not sure whether this would work. But maybe I'm missing something... However, since there is a major PR open for SUMM.AI (#1980), I'd suggest to wait until that PR is merged before proceeding with refactoring the SUMM.AI tests. It's not ideal to have multiple dependencies for the same task, but I guess it's better than to invest hours of hours into debugging this problem 😅 |
Motivation
In order to provide a stable machine translation feature, we should add tests for DeepL, similar to like we did for SUMM.AI.
Proposed Solution
Alternatives
Fingers crossed 🤞
The text was updated successfully, but these errors were encountered: