mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-18 10:46:31 +00:00
Unit test fixes (#10019)
* Add --keepdb option for unit test * Reduce server launch overhead - isGeneratingSchema was EXPENSIVE - Running a single unit test reduced from 30s to 3s * Option to disable check
This commit is contained in:
@@ -47,6 +47,12 @@ def isRunningBackup():
|
||||
|
||||
def isGeneratingSchema():
|
||||
"""Return true if schema generation is being executed."""
|
||||
if isInServerThread() or isInWorkerThread():
|
||||
return False
|
||||
|
||||
if isInTestMode():
|
||||
return False
|
||||
|
||||
if 'schema' in sys.argv:
|
||||
return True
|
||||
|
||||
|
@@ -814,7 +814,7 @@ inventree_tags = {
|
||||
}
|
||||
|
||||
# sentry.io integration for error reporting
|
||||
SENTRY_ENABLED = get_boolean_setting(
|
||||
SENTRY_ENABLED = not TESTING and get_boolean_setting(
|
||||
'INVENTREE_SENTRY_ENABLED', 'sentry_enabled', False
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user