mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
* Expanding bot tests * expanded tests * Added tests * Added stock test * Fix filepath * Attempted mock * Bots : test_run_telegram * Enhance tests * Fixed black * Expanded tests * Added fix * Ingore interactive files * Removed bot dependency installation from tests * Fix one black * Fixed black * Added init.py * Added pylint disables * Added skip Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
19 lines
421 B
Python
19 lines
421 B
Python
import pytest
|
|
|
|
|
|
class MockClient:
|
|
def chat_postMessage(self, channel, user, text):
|
|
print(channel)
|
|
print(user)
|
|
print(text)
|
|
|
|
|
|
@pytest.mark.bots
|
|
@pytest.mark.vcr
|
|
@pytest.mark.record_stdout
|
|
def test_processMessage(mocker):
|
|
mocker.patch("slack_bolt.App")
|
|
from bots.slack.run_slack import processMessage
|
|
|
|
processMessage({"channel": "1", "user": "13", "text": "test text"}, MockClient())
|