Skip to content

Commit 61b62fb

Browse files
committed
Fix warnings in integration tests
1 parent fdec84f commit 61b62fb

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

integration_tests/web/test_issue_677.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class TestWebClient(unittest.TestCase):
1616
"""Runs integration tests with real Slack API
1717
18-
https://github.com/slackapi/python-slackclient/issues/672
18+
https://github.com/slackapi/python-slackclient/issues/677
1919
"""
2020

2121
def setUp(self):
@@ -40,10 +40,13 @@ def test_date_link(self):
4040
fallback="fallback string",
4141
link="https://www.example.com"
4242
)
43-
message=f"Here is a date link: {link}"
43+
message = f"Here is a date link: {link}"
4444
response = client.chat_postMessage(channel=self.channel_id, text=message)
4545
self.assertIsNotNone(response)
46-
self.assertRegexpMatches(response["message"]["text"], r"Here is a date link: <!date^\d+^{date_long} {time}^https://www.example.com|fallback string>")
46+
self.assertRegex(
47+
r"Here is a date link: <!date^\d+^{date_long} {time}^https://www.example.com|fallback string>",
48+
response["message"]["text"],
49+
)
4750

4851
@async_test
4952
async def test_date_link_async(self):
@@ -54,7 +57,10 @@ async def test_date_link_async(self):
5457
fallback="fallback string",
5558
link="https://www.example.com"
5659
)
57-
message=f"Here is a date link: {link}"
60+
message = f"Here is a date link: {link}"
5861
response = await client.chat_postMessage(channel=self.channel_id, text=message)
5962
self.assertIsNotNone(response)
60-
self.assertRegexpMatches(response["message"]["text"], r"Here is a date link: <!date^\d+^{date_long} {time}^https://www.example.com|fallback string>")
63+
self.assertRegex(
64+
r"Here is a date link: <!date^\d+^{date_long} {time}^https://www.example.com|fallback string>",
65+
response["message"]["text"],
66+
)

0 commit comments

Comments
 (0)