mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
[fix] test case for remove-app
This commit is contained in:
parent
38d0f3baf7
commit
fa338fb5e1
@ -105,7 +105,7 @@ def install_app(app, bench_path='.', verbose=False):
|
||||
|
||||
|
||||
def remove_app(app, bench_path='.'):
|
||||
if not app in get_apps():
|
||||
if not app in get_apps(bench_path):
|
||||
print "No app named {0}".format(app)
|
||||
sys.exit(1)
|
||||
|
||||
@ -121,10 +121,10 @@ def remove_app(app, bench_path='.'):
|
||||
print "Cannot remove, app is installed on site: {0}".format(site)
|
||||
sys.exit(1)
|
||||
|
||||
exec_cmd(["{0} uninstall -y {1}".format(pip, app_path)], cwd=bench_path)
|
||||
exec_cmd(["{0} uninstall -y {1}".format(pip, app_path)])
|
||||
remove_from_appstxt(app, bench_path)
|
||||
shutil.rmtree(app_path)
|
||||
run_frappe_cmd("build", cwd=bench_path)
|
||||
run_frappe_cmd("build", bench_path=bench_path)
|
||||
if get_config(bench_path).get('restart_supervisor_on_update'):
|
||||
restart_supervisor_processes(bench_path=bench_path)
|
||||
|
||||
|
@ -118,10 +118,8 @@ class TestBenchInit(unittest.TestCase):
|
||||
|
||||
|
||||
def test_remove_app(self):
|
||||
site_name = "test-site-4.dev"
|
||||
self.init_bench('test-bench')
|
||||
|
||||
self.new_site(site_name)
|
||||
bench_path = os.path.join(self.benches_path, "test-bench")
|
||||
|
||||
# get app
|
||||
|
Loading…
Reference in New Issue
Block a user