# Copyright (c) 2020, XhiveFramework Technologies and Contributors
# License: MIT. See LICENSE

import xhiveframework
from xhiveframework.core.doctype.installed_applications.installed_applications import (
	InvalidAppOrder,
	update_installed_apps_order,
)
from xhiveframework.tests.utils import XhiveFrameworkTestCase


class TestInstalledApplications(XhiveFrameworkTestCase):
	def test_order_change(self):
		update_installed_apps_order(["xhiveframework"])
		self.assertRaises(InvalidAppOrder, update_installed_apps_order, [])
		self.assertRaises(InvalidAppOrder, update_installed_apps_order, ["xhiveframework", "deepmind"])
