Skip to content

Commit 54134d5

Browse files
committed
Fix cheap unittests
1 parent 53f1467 commit 54134d5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/cheap/test_api_conversation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setUp(self):
1515
def test_new_conversation(self):
1616
response = self.client.get('/api/conversation/list')
1717
original_count = len(response.json)
18-
response = self.client.get('/api/conversation/new',
18+
response = self.client.get('/api/conversation/new/0',
1919
follow_redirects=True)
2020
self.assertEqual(response.status_code, 200)
2121
response = self.client.get('/api/conversation/list')
@@ -28,8 +28,7 @@ def test_clear_conversation(self):
2828
self.assertEqual(response.status_code, 200)
2929

3030
def test_delete_conversation(self):
31-
create_resp = self.client.get('/api/conversation/new',
32-
follow_redirects=True)
31+
self.client.get('/api/conversation/new/0', follow_redirects=True)
3332
list_resp = self.client.get('/api/conversation/list')
3433
conversation_id = list(list_resp.json)[0]
3534
original_count = len(list_resp.json)

tests/cheap/test_app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22
from heymans.server import create_app, HeymansConfig
3+
from heymans import config
34

45

56
class UnitTestConfig(HeymansConfig):
@@ -11,6 +12,7 @@ class UnitTestConfig(HeymansConfig):
1112
class BaseRoutesTestCase(unittest.TestCase):
1213

1314
def setUp(self):
15+
config.subscription_required = False
1416
self.app = create_app(config_class=UnitTestConfig)
1517
self.client = self.app.test_client(use_cookies=True)
1618
self.app_context = self.app.app_context()

0 commit comments

Comments
 (0)