mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Update unit tests to match new docker paths (#3360)
* Update unit tests to match new docker paths Ref: https://github.com/inventree/InvenTree/pull/3357 * Add "wait" step before running dev server
This commit is contained in:
parent
5bb76a3730
commit
e383d6e955
@ -691,7 +691,7 @@ class TestSettings(helpers.InvenTreeTestCase):
|
|||||||
|
|
||||||
valid = [
|
valid = [
|
||||||
'inventree/config.yaml',
|
'inventree/config.yaml',
|
||||||
'inventree/dev/config.yaml',
|
'inventree/data/config.yaml',
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assertTrue(any([opt in config.get_config_file().lower() for opt in valid]))
|
self.assertTrue(any([opt in config.get_config_file().lower() for opt in valid]))
|
||||||
@ -706,7 +706,7 @@ class TestSettings(helpers.InvenTreeTestCase):
|
|||||||
|
|
||||||
valid = [
|
valid = [
|
||||||
'inventree/plugins.txt',
|
'inventree/plugins.txt',
|
||||||
'inventree/dev/plugins.txt',
|
'inventree/data/plugins.txt',
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assertTrue(any([opt in config.get_plugin_file().lower() for opt in valid]))
|
self.assertTrue(any([opt in config.get_plugin_file().lower() for opt in valid]))
|
||||||
|
14
tasks.py
14
tasks.py
@ -406,7 +406,13 @@ def import_fixtures(c):
|
|||||||
|
|
||||||
|
|
||||||
# Execution tasks
|
# Execution tasks
|
||||||
@task(help={'address': 'Server address:port (default=127.0.0.1:8000)'})
|
@task
|
||||||
|
def wait(c):
|
||||||
|
"""Wait until the database connection is ready."""
|
||||||
|
return manage(c, "wait_for_db")
|
||||||
|
|
||||||
|
|
||||||
|
@task(pre=[wait], help={'address': 'Server address:port (default=127.0.0.1:8000)'})
|
||||||
def server(c, address="127.0.0.1:8000"):
|
def server(c, address="127.0.0.1:8000"):
|
||||||
"""Launch a (deveopment) server using Django's in-built webserver.
|
"""Launch a (deveopment) server using Django's in-built webserver.
|
||||||
|
|
||||||
@ -415,12 +421,6 @@ def server(c, address="127.0.0.1:8000"):
|
|||||||
manage(c, "runserver {address}".format(address=address), pty=True)
|
manage(c, "runserver {address}".format(address=address), pty=True)
|
||||||
|
|
||||||
|
|
||||||
@task
|
|
||||||
def wait(c):
|
|
||||||
"""Wait until the database connection is ready."""
|
|
||||||
return manage(c, "wait_for_db")
|
|
||||||
|
|
||||||
|
|
||||||
@task(pre=[wait])
|
@task(pre=[wait])
|
||||||
def worker(c):
|
def worker(c):
|
||||||
"""Run the InvenTree background worker process."""
|
"""Run the InvenTree background worker process."""
|
||||||
|
Loading…
Reference in New Issue
Block a user