Build for v12 (#750)
* Build for v12 Typo!! * Fix Python 3.7 compatibility * Skip assets endpoint test on v12
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import json
|
||||
import socket
|
||||
from typing import Any, Iterable
|
||||
from typing import Any, Iterable, Tuple
|
||||
|
||||
Address = tuple[str, int]
|
||||
Address = Tuple[str, int]
|
||||
|
||||
|
||||
async def wait_for_port(address: Address) -> None:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -38,12 +39,7 @@ def assets_cb(text: str):
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("url", "callback"),
|
||||
(
|
||||
("/", index_cb),
|
||||
("/api/method/version", api_cb),
|
||||
("/assets/frappe/images/frappe-framework-logo.svg", assets_cb),
|
||||
),
|
||||
("url", "callback"), (("/", index_cb), ("/api/method/version", api_cb))
|
||||
)
|
||||
def test_endpoints(url: str, callback: Any, frappe_site: str):
|
||||
check_url_content(
|
||||
@@ -51,6 +47,17 @@ def test_endpoints(url: str, callback: Any, frappe_site: str):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
os.environ["FRAPPE_VERSION"][0:3] == "v12", reason="v12 doesn't have the asset"
|
||||
)
|
||||
def test_assets_endpoint(frappe_site: str):
|
||||
check_url_content(
|
||||
url=f"http://127.0.0.1/assets/frappe/images/frappe-framework-logo.svg",
|
||||
callback=assets_cb,
|
||||
site_name=frappe_site,
|
||||
)
|
||||
|
||||
|
||||
def test_files_reachable(frappe_site: str, tmp_path: Path, compose: Compose):
|
||||
content = "lalala\n"
|
||||
file_path = tmp_path / "testfile.txt"
|
||||
|
||||
Reference in New Issue
Block a user