Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stat committed Nov 18, 2024
1 parent a440764 commit 1e5786a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
1 change: 0 additions & 1 deletion twitter-langchain/examples/chatbot/chatbot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import sys
import time

Expand Down
6 changes: 2 additions & 4 deletions twitter-langchain/tests/actions/test_account_details.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from unittest.mock import patch
from json import dumps
from unittest.mock import patch

import tweepy

from cdp_agentkit_core.actions.social.twitter.account_details import (
account_details,
AccountDetailsInput,
)

MOCK_ID = 1234
Expand All @@ -27,7 +25,7 @@ def test_account_details_success(tweepy_factory):
mock_client_result = {
"data": {
"id": MOCK_ID,
"name": MOCK_USERNAME,
"name": MOCK_USERNAME,
"username": MOCK_USERNAME,
},
}
Expand Down
7 changes: 3 additions & 4 deletions twitter-langchain/tests/actions/test_account_mentions.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from unittest.mock import patch
from json import dumps
from unittest.mock import patch

import pytest
import tweepy

from cdp_agentkit_core.actions.social.twitter.account_mentions import (
account_mentions,
AccountMentionsInput,
account_mentions,
)

MOCK_ACCOUNT_ID = "1234"
Expand Down Expand Up @@ -58,4 +57,4 @@ def test_account_mentions_failure(tweepy_factory):

with patch.object(mock_client, "get_users_mentions", side_effect=expected_result) as mock_get_users_mentions:
response = account_mentions(mock_client, MOCK_ACCOUNT_ID)
assert response == expected_response
assert response == expected_response
5 changes: 2 additions & 3 deletions twitter-langchain/tests/actions/test_post_tweet.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from unittest.mock import patch
from json import dumps
from unittest.mock import patch

import pytest
import tweepy

from cdp_agentkit_core.actions.social.twitter.post_tweet import (
post_tweet,
PostTweetInput,
post_tweet,
)

MOCK_TWEET = "hello, world!"
Expand Down
5 changes: 2 additions & 3 deletions twitter-langchain/tests/actions/test_post_tweet_reply.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from unittest.mock import patch
from json import dumps
from unittest.mock import patch

import pytest
import tweepy

from cdp_agentkit_core.actions.social.twitter.post_tweet_reply import (
post_tweet_reply,
PostTweetReplyInput,
post_tweet_reply,
)

MOCK_TWEET_ID = "1234"
Expand Down
1 change: 1 addition & 0 deletions twitter-langchain/tests/factories/twitter_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest
import tweepy


@pytest.fixture
def tweepy_factory():
"""Create and return a factory for tweepy mock fixtures."""
Expand Down

0 comments on commit 1e5786a

Please sign in to comment.