tests.chat.db package#

Submodules#

tests.chat.db.test_qa_database module#

Test the QuestionAnswerDatabase class

class tests.chat.db.test_qa_database.TestQuestionAnswerDatabase(methodName='runTest')[source]#

Bases: TestCase

Test the QuestionAnswerDatabase class.

setUp()[source]#

Hook method for setting up the test fixture before exercising it.

tearDown()[source]#

Hook method for deconstructing the test fixture after testing it.

test_create_table()[source]#

Test whether the table is created correctly.

test_insert_and_retrieve_question_answer()[source]#

Test inserting and retrieving a question-answer pair

test_save_to_csv()[source]#

Test saving data to a CSV file

test_update_vote_status()[source]#

Test updating the vote status of a question-answer pair.

tests.chat.db.test_ranking_database module#

Test the RankingDatabase class

class tests.chat.db.test_ranking_database.TestRankingDatabase(methodName='runTest')[source]#

Bases: TestCase

Test the RankingDatabase class

setUp()[source]#

Hook method for setting up the test fixture before exercising it.

tearDown()[source]#

Hook method for deconstructing the test fixture after testing it.

test_create_table()[source]#

Test whether the table is created correctly.

test_insert_and_retrieve_ranking()[source]#

Test inserting and retrieving a ranking entry

test_save_to_csv()[source]#

Test saving data to a CSV file

Module contents#