File size: 657 Bytes
dad7128
 
 
 
 
b318e14
dad7128
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import unittest

from app import respond

class TestApp(unittest.TestCase):
    # @unittest.skip("Too slow, skip for now")
    def test_respond_local_mode(self):
        # test call respond call
        for ret in respond(message="Please rpeat and only repeat what I say to you. 'HI'", history=[], use_local_model=True):
            self.assertTrue(ret is not None)

    def test_respond_api_mode(self):
        # test call respond call
        for ret in respond(message="Please rpeat and only repeat what I say to you. 'HI'", history=[], use_local_model=False):
            self.assertTrue(ret is not None)


if __name__ == "__main__":
    unittest.main()