Closed EliAndrewC closed 8 years ago
The prevention of initialize_db could be done via py.test fixture in the top level conftest.py
On Mon, Mar 24, 2014 at 6:56 PM, Eli Courtwright notifications@github.com wrote:
sideboard.lib.sa.Session when subclassed provides an initialize_db call which is called at import time. This is what we want when Sideboard runs, but not when running unit tests.
Because we run our unit tests with py.test, we should probably just say something like if sys.argv[0] != "py.test" before running initialize_db, which will e.g. prevent us from needing a postgres database on Jenkins when all we're doing is using sqlite.
Reply to this email directly or view it on GitHub: https://github.com/appliedsec/sideboard/issues/22
sideboard.lib.sa.Session when subclassed provides an initialize_db call which is called at import time. This is what we want when Sideboard runs, but not when running unit tests.
Because we run our unit tests with py.test, we should probably just say something like if sys.argv[0] != "py.test" before running initialize_db, which will e.g. prevent us from needing a postgres database on Jenkins when all we're doing is using sqlite.