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

import jingrow
from jingrow.core.pagetype.installed_applications.installed_applications import (
	InvalidAppOrder,
	update_installed_apps_order,
)
from jingrow.tests.utils import JingrowTestCase


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