hugo_themes_report/test
2021-08-21 15:18:09 -07:00
..
__init__.py add unittest test_title 2021-08-20 11:40:12 -07:00
database.py add unittests for database 2021-08-21 09:56:14 -07:00
README.md add cron example to test/README.md 2021-08-21 13:18:42 -07:00
test_database.py add unittests for database 2021-08-21 09:56:14 -07:00
test_selenium.py add unittests for database 2021-08-21 09:56:14 -07:00
test_title.py fix line length test_title.py 2021-08-21 15:18:09 -07:00

To run these tests just type the command

python3 -m unittest

Or you can just run a specific file of tests

python3 -m unittest test.test_title

Or run a specific test class in a specific file

python3 -m unittest test.test_title.TestTitle

Or run a specific test function in a specific class in a specific file

python3 -m unittest test.test_title.TestTitle.test_title_anchor

cron example everyday at 6am

#!/bin/bash
PATH=/usr/local/bin:/usr/bin:/bin
0 4 * * * cd <project directory> && <rsync the db file>
0 5 * * * cd <project directory> && <rsync the html output directory>
0 6 * * * cd <project directory> && bash -c 'echo "$((python3 -m unittest)2>&1)"' | sendxmpp <sendxmpp params>