test: Added tests for bench remove-from-installed-apps
This commit is contained in:
parent
823aec2d87
commit
cb44492feb
1 changed files with 14 additions and 1 deletions
|
|
@ -121,7 +121,6 @@ class TestCommands(BaseTestCommands):
|
|||
self.execute("bench --site {site} backup --verbose")
|
||||
self.assertEquals(self.returncode, 0)
|
||||
|
||||
|
||||
def test_recorder(self):
|
||||
frappe.recorder.stop()
|
||||
|
||||
|
|
@ -132,3 +131,17 @@ class TestCommands(BaseTestCommands):
|
|||
self.execute("bench --site {site} stop-recording")
|
||||
frappe.local.cache = {}
|
||||
self.assertEqual(frappe.recorder.status(), False)
|
||||
|
||||
def test_remove_from_installed_apps(self):
|
||||
from frappe.installer import add_to_installed_apps
|
||||
app = "test_remove_app"
|
||||
add_to_installed_apps(app)
|
||||
|
||||
# check: confirm that add_to_installed_apps added the app in the default
|
||||
self.execute("bench --site {site} list-apps")
|
||||
self.assertIn(app, self.stdout)
|
||||
|
||||
# test 1: remove app from installed_apps global default
|
||||
self.execute("bench --site {site} remove-from-installed-apps {app}", {"app": app})
|
||||
self.execute("bench --site {site} list-apps")
|
||||
self.assertNotIn(app, self.stdout)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue