Skip to content

Commit

Permalink
Move prettify_and_dedup_list test location
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Tubbing committed Feb 7, 2024
1 parent 8069350 commit 62a0ede
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tests/unit/clients/slack/test_slack_message_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from elementary.clients.slack.schema import SlackMessageSchema
from elementary.clients.slack.slack_message_builder import SlackMessageBuilder
from elementary.utils.strings import prettify_and_dedup_list


def test_create_divider_block():
Expand Down Expand Up @@ -323,16 +322,6 @@ def test_create_button_action_block(text, url):
)


def test_prettify_and_dedup_list():
list_prettified = prettify_and_dedup_list(["name1", "name2", "name2"])
assert list_prettified == "name1, name2"

assert prettify_and_dedup_list("name1, name2, name2") == "name1, name2"

string_of_list_prettified = prettify_and_dedup_list('["name1", "name2", "name2"]')
assert string_of_list_prettified == "name1, name2"


def test_slack_message_attachments_limit():
very_short_attachments = ["attachment"] * (
SlackMessageBuilder._MAX_AMOUNT_OF_ATTACHMENTS - 1
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/utils/test_strings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from elementary.utils.strings import prettify_and_dedup_list


def test_prettify_and_dedup_list():
list_prettified = prettify_and_dedup_list(["name1", "name2", "name2"])
assert list_prettified == "name1, name2"

assert prettify_and_dedup_list("name1, name2, name2") == "name1, name2"

string_of_list_prettified = prettify_and_dedup_list('["name1", "name2", "name2"]')
assert string_of_list_prettified == "name1, name2"

0 comments on commit 62a0ede

Please sign in to comment.