Initial commit

This commit is contained in:
phil 2024-12-01 00:53:31 +01:00
commit 2463355b0b
11 changed files with 1029 additions and 0 deletions

21
tests/basic.py Normal file
View file

@ -0,0 +1,21 @@
from fastapi.testclient import TestClient
from sms_handler.server import app
client = TestClient(app)
def test_handle_sms():
with TestClient(app) as client:
response = client.post(
"/handle-sms",
json={
"text": "Hello!",
"from": "12345678",
"sentStamp": "1234",
"receivedStamp": "1235",
"sim": "1",
},
)
assert response.status_code == 200
assert response.json() == "OK"