Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smathot committed Jan 10, 2025
1 parent 27ca375 commit 3c1fd27
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/cheap/test_api_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setUp(self):
self.login()

def test_chat_without_search(self):
self.client.post('/api/setting/set', json={'search_first': 'false'})
self.client.post('/api/setting/set', json={'mode': 'academic'})
response = self.client.post('/api/chat/start', json={
'message': 'hello'
})
Expand All @@ -33,7 +33,7 @@ def test_chat_without_search(self):
assert data['action'] == 'close'

def test_chat_with_search(self):
self.client.post('/api/setting/set', json={'search_first': 'true'})
self.client.post('/api/setting/set', json={'mode': 'opensesame'})
response = self.client.post('/api/chat/start', json={
'message': 'hello'
})
Expand All @@ -53,4 +53,4 @@ def test_chat_with_search(self):


if __name__ == '__main__':
unittest.main()
unittest.main()
6 changes: 3 additions & 3 deletions tests/cheap/test_api_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def setUp(self):

def test_new_conversation(self):
# Add some content to the conversation to make it count
self.client.post('/api/setting/set', json={'search_first': 'false'})
self.client.post('/api/setting/set', json={'mode': 'academic'})
response = self.client.post('/api/chat/start', json={
'message': 'dummy'
})
Expand All @@ -34,7 +34,7 @@ def test_clear_conversation(self):

def test_delete_conversation(self):
# Add some content to the conversation to make it count
self.client.post('/api/setting/set', json={'search_first': 'false'})
self.client.post('/api/setting/set', json={'mode': 'opensesame'})
response = self.client.post('/api/chat/start', json={
'message': 'dummy'
})
Expand Down Expand Up @@ -63,4 +63,4 @@ def test_activate_conversation(self):


if __name__ == '__main__':
unittest.main()
unittest.main()
4 changes: 2 additions & 2 deletions tests/expensive/test_tool_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
class TestToolsDownload(BaseExpensiveTest):

def _test_tool(self):
query = 'Can you download https://www.biorxiv.org/content/10.1101/2023.12.05.570327v1.full.pdf for me?'
query = 'Can you download https://raw.githubusercontent.com/open-cogsci/sigmund-ai/refs/heads/master/readme.md for me?'
n = len(self.sigmund.database.list_attachments())
for reply, metadata in self.sigmund.send_user_message(query):
print(reply)
assert len(self.sigmund.database.list_attachments()) == n + 1
assert len(self.sigmund.database.list_attachments()) == n + 1

0 comments on commit 3c1fd27

Please sign in to comment.