示例#1
0
 def test_remove_chat(self):
     row_count = db.remove_chat(self.user_id, self.session_id)
     self.assertEqual(4, row_count)
     self.assertEqual([], db.query_chat(self.user_id, self.session_id))
示例#2
0
 def test_query_chat(self):
     items = db.query_chat()
     self.assertTrue(len(items) >= 4)
示例#3
0
 def test_query_chat_by_userId(self):
     items = db.query_chat(user_id=self.user_id)
     self.assertEqual(4, len(items))
示例#4
0
 def test_query_chat_by_sessionId(self):
     items = db.query_chat(session_id=self.session_id)
     self.assertEqual(4, len(items))
示例#5
0
 def test_query_chat_by_userId_session_id(self):
     items = db.query_chat(self.user_id, self.session_id)
     for item in items:
         print(item)
     self.assertEqual(4, len(items))