Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
Fix spelling on send_message discord function
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsabri committed Oct 24, 2023
1 parent b07e214 commit c7c682e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/infrastructure/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ class DiscordInfrastructure:
def __init__(self, webhook_url):
self.webhook_url = webhook_url

def send_messege(self, message):
def send_message(self, message):
full_message = {"content": message}
requests.post(self.webhook_url, json=full_message, timeout=5)
2 changes: 1 addition & 1 deletion src/usecase/apartment.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ def store_apartment(self, apartment: Apartment):
return self.apartment_repository.post_apartment_listing(apartment)

def post_to_discord(self, apartment):
self.discord_infrastructure.send_messege(str(apartment))
self.discord_infrastructure.send_message(str(apartment))
4 changes: 2 additions & 2 deletions tests/infrastructure/test_discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def tearDown(self):
# Stop the patcher to clean up
self.patcher.stop()

def test_send_messege(self):
def test_send_message(self):
message = "Test message"
self.discord.send_messege(message)
self.discord.send_message(message)

# Check that requests.post was called with the expected arguments
self.mock_requests.assert_called_once_with(self.webhook_url, json={"content": message}, timeout=5)
Expand Down

0 comments on commit c7c682e

Please sign in to comment.