Skip to content

Commit

Permalink
Merge pull request #56 from jphacks/feature/fix_typo
Browse files Browse the repository at this point in the history
sesison to session
  • Loading branch information
motty-mio2 authored Nov 17, 2023
2 parents cdfd62e + 7c0344f commit 88dea20
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/kb_2315/backend/api/endpoints/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def search_shoe(item: schema_sensor.sensor) -> None:
external_humidity=item.external_humidity,
internal_temperature=item.internal_temperature,
internal_humidity=item.internal_humidity,
sesison_id=uuid,
session_id=uuid,
drying=item.drying,
)

Expand Down
4 changes: 2 additions & 2 deletions src/kb_2315/backend/crud/crud_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def add_sensor(
internal_temperature: float,
internal_humidity: float,
drying: bool,
sesison_id: UUID,
session_id: UUID,
) -> None:
with self._Session() as session:
new_sensor = Sensor()
Expand All @@ -26,7 +26,7 @@ def add_sensor(
new_sensor.external_humidity = external_humidity
new_sensor.internal_temperature = internal_temperature
new_sensor.internal_humidity = internal_humidity
new_sensor.session_id = sesison_id
new_sensor.session_id = session_id
new_sensor.drying = drying

session.add(new_sensor)
Expand Down
6 changes: 3 additions & 3 deletions src/test/api/t_gen_resp.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
obj=requests.get(f"{conf.host_url}/session/?device_id={device_id}").json()
)

str_sesison_id = str(resp.session_id)
str_session_id = str(resp.session_id)

print(device_id, str_sesison_id)
print(device_id, str_session_id)

it = 3

for i in range(it):
requests.post(
url=f"{conf.host_url}/sensor/",
json=schema_sensor.sensor(
session_id=str_sesison_id,
session_id=str_session_id,
device_id=device_id,
external_temperature=random() * 30,
external_humidity=random() * 100,
Expand Down

0 comments on commit 88dea20

Please sign in to comment.