Browse Source

Update test_innodrive.py

main
Maxim Matantsev 2 years ago committed by GitHub
parent
commit
81a49da123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      tests/test_innodrive.py

6
tests/test_innodrive.py

@ -2,7 +2,7 @@
import pytest import pytest
from hypothesis import given from hypothesis import given
import json import ujson
import hypothesis.strategies as st import hypothesis.strategies as st
from httpx import Client from httpx import Client
@ -38,7 +38,7 @@ def test_budget_multiple_requests(test_app, email, numbers):
"planned_time": numbers, "planned_time": numbers,
"inno_discount": "no" "inno_discount": "no"
} }
response = test_app.post("/rangeprice/" + email, content=json.dumps(data)) response = test_app.post("/rangeprice/" + email, content=ujson.dumps(data))
assert response.json()['price'] == my_spec["budget_minute_price"] * numbers assert response.json()['price'] == my_spec["budget_minute_price"] * numbers
@pytest.mark.parametrize("email", ["m.matantsev@innopolis.university"]) @pytest.mark.parametrize("email", ["m.matantsev@innopolis.university"])
@ -53,5 +53,5 @@ def test_luxury_multiple_requests(test_app, email, numbers):
"planned_time": numbers, "planned_time": numbers,
"inno_discount": "no" "inno_discount": "no"
} }
response = test_app.post("/rangeprice/" + email, content=json.dumps(data)) response = test_app.post("/rangeprice/" + email, content=ujson.dumps(data))
assert response.json()['price'] == my_spec["luxury_minute_price"] * numbers assert response.json()['price'] == my_spec["luxury_minute_price"] * numbers

Loading…
Cancel
Save