-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding OpenAI & Update IG test * Adding RoastingIG * Update workflow
- Loading branch information
1 parent
df8b0b4
commit 41226b5
Showing
8 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from django.conf import settings | ||
from openai import OpenAI | ||
|
||
openai_client = OpenAI(api_key=settings.OPENAI_API_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.test import TestCase | ||
|
||
from instagram.utils import InstagramAPI, RoastingIG | ||
|
||
|
||
class TestGetInstagramRoastingText(TestCase): | ||
def setUp(self): | ||
self.instagram_api = InstagramAPI() | ||
self.instagram_user_data = self.instagram_api.get_user_info_v2("arter_tendean") | ||
|
||
def test_get_profile_picture_keywords(self): | ||
profile_picture_keywords = RoastingIG.get_profile_picture_keywords( | ||
self.instagram_user_data.get("profile_pic_url") | ||
) | ||
self.assertIsNotNone(profile_picture_keywords, "Should return profile picture keywords") | ||
|
||
def test_get_instagram_roasting_text(self): | ||
roasting_text = RoastingIG.get_instagram_roasting_text(self.instagram_user_data) | ||
self.assertIsNotNone(roasting_text, "Should return roasting text") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters