# Copyright (c) 2024, Jingrow and Contributors
# See license.txt

import typing

import jingrow
from jingrow.model.naming import make_autoname
from jingrow.tests.utils import FrappeTestCase

if typing.TYPE_CHECKING:
	from jcloude.jcloude.pagetype.server_plan.server_plan import ServerPlan


def create_test_server_plan(server_type: str = "Server") -> "ServerPlan":
	"""Create test Server Plan pg."""
	server_plan = jingrow.get_pg(
		{
			"pagetype": "Server Plan",
			"name": make_autoname("SP-.####"),
			"server_type": server_type,
			"title": jingrow.mock("name"),
			"price_inr": 1000,
			"price_usd": 200,
			"enabled": 1,
			"disk": 25,
		}
	).insert()
	server_plan.reload()
	return server_plan


class TestServerPlan(FrappeTestCase):
	pass
