@@ -25,8 +25,8 @@ def test_list_posts(self, mock_client):
2525 "name" : "TestAgent" ,
2626 "karma" : 10 ,
2727 },
28- "upvotes " : 5 ,
29- "downvotes " : 0 ,
28+ "likes " : 5 ,
29+ "liked " : False ,
3030 "comment_count" : 2 ,
3131 "url" : "https://agentgram.co/posts/post-1" ,
3232 "created_at" : "2024-01-01T00:00:00Z" ,
@@ -58,8 +58,8 @@ def test_create_post(self, mock_client):
5858 "name" : "TestAgent" ,
5959 "karma" : 10 ,
6060 },
61- "upvotes " : 0 ,
62- "downvotes " : 0 ,
61+ "likes " : 0 ,
62+ "liked " : False ,
6363 "comment_count" : 0 ,
6464 "url" : "https://agentgram.co/posts/post-new" ,
6565 "created_at" : "2024-01-01T00:00:00Z" ,
@@ -93,8 +93,8 @@ def test_get_post(self, mock_client):
9393 "name" : "TestAgent" ,
9494 "karma" : 10 ,
9595 },
96- "upvotes " : 15 ,
97- "downvotes " : 2 ,
96+ "likes " : 15 ,
97+ "liked " : False ,
9898 "comment_count" : 5 ,
9999 "url" : "https://agentgram.co/posts/post-123" ,
100100 "created_at" : "2024-01-01T00:00:00Z" ,
@@ -106,7 +106,7 @@ def test_get_post(self, mock_client):
106106 post = client .posts .get ("post-123" )
107107
108108 assert post .id == "post-123"
109- assert post .upvotes == 15
109+ assert post .likes == 15
110110 client .close ()
111111
112112 @patch ("agentgram.http.httpx.Client" )
@@ -123,8 +123,8 @@ def test_add_comment(self, mock_client):
123123 "name" : "TestAgent" ,
124124 "karma" : 10 ,
125125 },
126- "upvotes " : 0 ,
127- "downvotes " : 0 ,
126+ "likes " : 0 ,
127+ "liked " : False ,
128128 "created_at" : "2024-01-01T00:00:00Z" ,
129129 "updated_at" : "2024-01-01T00:00:00Z" ,
130130 }
@@ -139,14 +139,14 @@ def test_add_comment(self, mock_client):
139139 client .close ()
140140
141141 @patch ("agentgram.http.httpx.Client" )
142- def test_upvote_post (self , mock_client ):
143- """Test upvoting a post."""
142+ def test_like_post (self , mock_client ):
143+ """Test liking a post."""
144144 mock_response = Mock ()
145145 mock_response .is_success = True
146146 mock_response .status_code = 204
147147 mock_client .return_value .request .return_value = mock_response
148148
149149 client = AgentGram (api_key = "ag_test" )
150150 # Should not raise any exception
151- client .posts .upvote ("post-123" )
151+ client .posts .like ("post-123" )
152152 client .close ()
0 commit comments