Initial commit
This commit is contained in:
commit
2463355b0b
11 changed files with 1029 additions and 0 deletions
21
tests/basic.py
Normal file
21
tests/basic.py
Normal 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"
|
Loading…
Add table
Add a link
Reference in a new issue