LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

⌈⌋ ⎇ branch:  PageTranslate


Artifact [e7da7a1fab]

Artifact e7da7a1fabcae50d77610bb2db8bd72cc3838cbc:

  • File test/httpfaux.py — part of check-in [72453b0947] at 2022-10-23 05:51:10 on branch trunk — faux: move params= to .get (user: mario size: 599)

import pytest
from httprequests import FauxRequests

@pytest.fixture(scope="module")
def http():
    return FauxRequests()

def get(http):
    resp = http.get("https://example.org/")
    assert resp.status_code == 200
    assert resp.headers

def params(http):
    resp = http.get("https://httpbin.org/get", params={"key":"val"})
    assert resp.json()["args"]["key"] == "val"

def post(http):
    resp = http.post("https://httpbin.org/post", data={"a":"b", "c":"d"})
    assert resp.json()["form"]["a"] == "b"

def json(http):
    resp = http.get("https://httpbin.org/json")
    assert resp.json()