Skip to content

Commit

Permalink
Merge pull request #70 from sc4n1a471/69-test-response-with-error-mes…
Browse files Browse the repository at this point in the history
…sages

feat: added test response with error message
  • Loading branch information
sc4n1a471 committed Oct 31, 2023
2 parents e0de75f + 945a6e1 commit 59a3836
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions application/request_car.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ async def request_car(license_plates, websocket_param):
await settings.send_data("message", None, 17, "success")
return

if license_plates[0].lower() == "test112":
settings.driver.quit()

counter = 0

# iterate through RES.get("data")[0] and its keys, values and send them one by one
for key, value in RES.get("data")[0].items():
time.sleep(0.25)
await settings.send_data(key, value, counter)
counter += 5
await settings.send_data("message", "This is a test error message", 17, "fail")
return

settings.driver.get(settings.URL)

try:
Expand Down

0 comments on commit 59a3836

Please sign in to comment.