Add support for fromName, update README
All checks were successful
/ test (push) Successful in 5s

This commit is contained in:
phil 2024-12-03 18:32:59 +01:00
parent 6d8743e183
commit f6d0916dec
4 changed files with 69 additions and 19 deletions

View file

@ -19,3 +19,20 @@ def test_handle_sms():
)
assert response.status_code == 200
assert response.json() == "OK"
def test_handle_sms_with_fromName():
with TestClient(app) as client:
response = client.post(
"/handle-sms",
json={
"text": "Hello!",
"from": "12345678",
"fromName": "foobar",
"sentStamp": "1234",
"receivedStamp": "1235",
"sim": "2",
},
)
assert response.status_code == 200
assert response.json() == "OK"