# -*- coding: utf-8 -*-
# Copyright (c) 2020, JINGROW
# See license.txt


import unittest
from datetime import datetime
from typing import Optional

import jingrow


def create_test_remote_file(
	site: Optional[str] = None,
	creation: datetime = None,
	file_path: str = None,
	file_size: int = 1024,
):
	"""Create test remote file pg for required timestamp."""
	creation = creation or jingrow.utils.now_datetime()
	remote_file = jingrow.get_pg(
		{
			"pagetype": "Remote File",
			"status": "Available",
			"site": site,
			"file_path": file_path,
			"file_size": file_size,
		}
	).insert(ignore_if_duplicate=True)
	remote_file.db_set("creation", creation)
	remote_file.reload()
	return remote_file


class TestRemoteFile(unittest.TestCase):
	pass
