Skip to content

Commit

Permalink
Fix trailing slash (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Apr 10, 2024
1 parent c403954 commit f4b2af7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ def validate_run_id(self, _, run_id: str):
)

def try_publish_event(self, event: BaseEvent) -> None:
url = urljoin(self.base_url.strip("/"), f"/api/runs/{self.run_id}/events/")
url = urljoin(self.base_url.strip("/"), f"/api/runs/{self.run_id}/events")

requests.post(url=url, json=event.to_dict(), headers=self.headers)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_try_publish_event(self, mock_post, driver):
driver.try_publish_event(event=event)

mock_post.assert_called_once_with(
url=f"https://cloud.griptape.ai/api/runs/{driver.run_id}/events/",
url=f"https://cloud.griptape.ai/api/runs/{driver.run_id}/events",
json=event.to_dict(),
headers={"Authorization": "Bearer foo bar"},
)
Expand Down

0 comments on commit f4b2af7

Please sign in to comment.