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))
def test_query_chat(self): items = db.query_chat() self.assertTrue(len(items) >= 4)
def test_query_chat_by_userId(self): items = db.query_chat(user_id=self.user_id) self.assertEqual(4, len(items))
def test_query_chat_by_sessionId(self): items = db.query_chat(session_id=self.session_id) self.assertEqual(4, len(items))
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))