forked from ScoDoc/ScoDoc
removed obsolete test-interactive command
This commit is contained in:
parent
04d5dd2ad7
commit
af77a2a389
18
scodoc.py
18
scodoc.py
@ -188,24 +188,6 @@ def create_dept(dept): # create-dept
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
@app.cli.command()
|
|
||||||
@click.argument("filename")
|
|
||||||
@with_appcontext
|
|
||||||
def test_interactive(filename=None):
|
|
||||||
"Run interactive test"
|
|
||||||
import flask_login
|
|
||||||
from app import decorators
|
|
||||||
|
|
||||||
click.echo("Executing {}".format(filename))
|
|
||||||
with app.test_request_context(""):
|
|
||||||
u = User.query.first()
|
|
||||||
flask_login.login_user(u)
|
|
||||||
REQUEST = decorators.ZRequest()
|
|
||||||
exec(open(filename).read())
|
|
||||||
|
|
||||||
click.echo("Done.")
|
|
||||||
|
|
||||||
|
|
||||||
@app.cli.command()
|
@app.cli.command()
|
||||||
@with_appcontext
|
@with_appcontext
|
||||||
def import_scodoc7_users(): # import-scodoc7-users
|
def import_scodoc7_users(): # import-scodoc7-users
|
||||||
|
Loading…
Reference in New Issue
Block a user