2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

test: fixed get-app case

This commit is contained in:
Gavin D'souza 2020-05-12 12:39:58 +05:30
parent 1928eaa2c5
commit 356dd8efe5

View File

@ -11,10 +11,7 @@ import git
import bench import bench
import bench.utils import bench.utils
from bench.release import get_bumped_version from bench.release import get_bumped_version
from bench.tests.test_base import TestBenchBase from bench.tests.test_base import TestBenchBase, FRAPPE_BRANCH
ERPNEXT_BRANCH = bench.tests.test_base.FRAPPE_BRANCH
class TestBenchInit(TestBenchBase): class TestBenchInit(TestBenchBase):
@ -102,7 +99,7 @@ class TestBenchInit(TestBenchBase):
self.init_bench(bench_name) self.init_bench(bench_name)
bench.utils.exec_cmd("bench setup requirements --node", cwd=bench_path) bench.utils.exec_cmd("bench setup requirements --node", cwd=bench_path)
bench.utils.exec_cmd("bench build", cwd=bench_path) bench.utils.exec_cmd("bench build", cwd=bench_path)
bench.utils.exec_cmd("bench get-app erpnext", cwd=bench_path) bench.utils.exec_cmd("bench get-app erpnext --branch {0}".format(FRAPPE_BRANCH), cwd=bench_path)
self.assertTrue(os.path.exists(os.path.join(bench_path, "apps", "erpnext"))) self.assertTrue(os.path.exists(os.path.join(bench_path, "apps", "erpnext")))
@ -112,7 +109,7 @@ class TestBenchInit(TestBenchBase):
# create and install app on site # create and install app on site
self.new_site(site_name, bench_name) self.new_site(site_name, bench_name)
installed_erpnext = not bench.utils.exec_cmd("bench --site {0} install-app erpnext --branch {1}".format(site_name, ERPNEXT_BRANCH), cwd=bench_path) installed_erpnext = not bench.utils.exec_cmd("bench --site {0} install-app erpnext".format(site_name), cwd=bench_path)
app_installed_on_site = subprocess.check_output(["bench", "--site", site_name, "list-apps"], cwd=bench_path).decode('utf8') app_installed_on_site = subprocess.check_output(["bench", "--site", site_name, "list-apps"], cwd=bench_path).decode('utf8')