Difference between revisions of "User:Alvonruff/ISFDB Tests"

From ISFDB
Jump to navigation Jump to search
Line 5: Line 5:
 
* Testing for select statements that return nothing.
 
* Testing for select statements that return nothing.
  
Although non-destructive, these tests should probably not be run against the production server.
+
Although non-destructive, these tests should probably not be run against the production server. The goal is to be able to run the tests on both Python2 and Python3, and generate exactly the same results.
  
 
==SQLparsing Tests==
 
==SQLparsing Tests==

Revision as of 09:09, 12 May 2023

These are formal tests using the unittest module. The tests are mostly concerned with:

  • Testing return types (int, string, float, etc).
  • Testing input arguments.
  • Testing for select statements that return nothing.

Although non-destructive, these tests should probably not be run against the production server. The goal is to be able to run the tests on both Python2 and Python3, and generate exactly the same results.

SQLparsing Tests

Author-Related Methods

These are mostly methods that perform a select on the authors table.

SQL Method Status
SQLAuthorsBorn(date) DONE
SQLAuthorsDied(date) DONE
SQLFindAuthors(target, mode = 'contains') DONE
SQLFindReviewParent(title, author, referral_lang)
SQLgetActualFromPseudo(au_id) DONE
SQLGetAllAuthorsForPublisher(publisher_id, sort_by) DONE
SQLgetAuthorData(author) DONE
SQLGetAuthorDirectory() DONE
SQLgetBriefActualFromPseudo(au_id) DONE
SQLgetBriefPseudoFromActual(au_id) DONE
SQLGetCoverAuthorsForPubs(pub_list) DONE
SQLGetFrontPagePubs(front_page)
SQLInterviewAuthors(title_id)
SQLInterviewBriefAuthorRecords(title_id)
SQLIntervieweeAuthors(title_id, author_id = 0)
SQLloadAuthorData(author_id) DONE
SQLLoadTransAuthorNamesList(author_ids) DONE
SQLMultipleAuthors(name) DONE
SQLPubAuthors(pub_id)
SQLPubBriefAuthorRecords(pub_id)
SQLPubListBriefAuthorRecords(pub_list)
SQLReviewAuthors(title_id)
SQLReviewBriefAuthorRecords(title_id)
SQLReviewedAuthors(title_id)
SQLTitleAuthors(title_id)
SQLTitleBriefAuthorRecords(title_id) DONE
SQLTitleListBriefAuthorRecords(title_list, author_id = 0)
SQLtransLegalNames(author_ids)