def mock_response(self): responses.add(responses.POST, DEEPL_LANGUAGES.format("v2"), json=DEEPL_LANG_RESPONSE) responses.add(responses.POST, DEEPL_TRANSLATE.format("v2"), json=DEEPL_RESPONSE)
def mock_error(self): responses.add( responses.POST, DEEPL_LANGUAGES.format("v2"), json=DEEPL_LANG_RESPONSE, status=500, ) responses.add( responses.POST, DEEPL_TRANSLATE.format("v2"), json=DEEPL_RESPONSE, status=500, )