Skip to content

Commit

Permalink
Add tests for special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed Oct 16, 2020
1 parent 5d3cdf6 commit 6e8c4ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/emails_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def test_search_by_subject(self):
self.assertEqual(1, len(results))
self.assertEqual(target_email.to[0].email, results[0].to[0].email)
self.assertEqual(target_email.subject, results[0].subject)

def test_search_with_special_characters(self):
criteria = SearchCriteria()
criteria.subject = "Search with ellipsis … and emoji 👨🏿‍🚒"
results = self.client.messages.search(self.server, criteria).items
self.assertEqual(0, len(results))

def test_spam_analysis(self):
target_id = self.emails[0].id
Expand Down
2 changes: 1 addition & 1 deletion tests/servers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_crud(self):
self.assertIsInstance(retrieved_server.forwarding_rules, list)

# Update a server and confirm it has changed
retrieved_server.name += " EDITED"
retrieved_server.name += " updated with ellipsis … and emoji 👨🏿‍🚒"
updated_server = self.client.servers.update(retrieved_server.id, retrieved_server)
self.assertEqual(retrieved_server.id, updated_server.id)
self.assertEqual(retrieved_server.name, updated_server.name)
Expand Down

0 comments on commit 6e8c4ed

Please sign in to comment.