Skip to content

Commit

Permalink
test create_suggestion_service
Browse files Browse the repository at this point in the history
  • Loading branch information
andreformento committed Jun 27, 2021
1 parent 75f2683 commit 35875e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_suggestion_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

from suggestions import (
Suggestion,
SuggestionServiceInterface,
MailjetSuggestionService,
create_suggestion_service,
)


Expand Down Expand Up @@ -73,3 +75,17 @@ def test_not_send_email(self):

self.assertFalse(suggestion_result)
self.mailjet_client.send.create.assert_called_with(data=data)


class SuggestionServiceFactory(TestCase):
def test_create_suggestion_service(self):
suggestion_service = create_suggestion_service(
suggestion_mailjet_rest_api_key="suggestion_mailjet_rest_api_key",
suggestion_mailjet_rest_api_secret="suggestion_mailjet_rest_api_secret",
suggestion_sender_name="suggestion_sender_name",
suggestion_sender_email="suggestion_sender_email",
suggestion_recipient_name="suggestion_recipient_name",
suggestion_recipient_email="suggestion_recipient_email",
suggestion_mailjet_custom_id="suggestion_mailjet_custom_id",
)
self.assertIsInstance(suggestion_service, SuggestionServiceInterface)

0 comments on commit 35875e3

Please sign in to comment.