tests module¶
Runs tests (encapsulated in a Test class) and documents results in test_output/logs.txt
-
class
tests.Test¶ Bases:
object-
api_interactions()¶ Tests that the DOI & OCI APIs are working by testing for doi=‘10.1186/ar4086’.
-
bib_reader()¶ Tests that reader.py is able to read in .bib files by running a check on the _references.bib and _citations.bib files for @RWebberBurrows2018.
-
db_commands()¶ Tests that database commands from ../db_commands.py are working as expected.
Parameters: file (string) – file location for db_commands.py
-
flask_app(page_location, confirmation)¶ Tests that Flask App is running as expected.
Uses Selenium Webdriver to check Flask App is running as expected.
Parameters: - URL (string) – the address where the Flask App is running.
- page_title (string) – the title of the webpage, as it should be defined by <title> tags.
-
lit_classes()¶ Tests that the literature.py classes are working.
-
logic()¶ Shows that the basic logic of my Test framework works.
-
pdf_reader()¶ Tests that reader.py is able to read and interpret .pdf files by running a check on the pdf file of references for @RWebberBurrows2018.
-