2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-29 23:39:02 +00:00

test: Added tests for frappe tags

This commit is contained in:
Aradhya 2022-05-15 23:58:45 +05:30
parent 19f932513f
commit e7055fc6d9
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ class TestUtils(unittest.TestCase):
is_valid_frappe_branch("https://github.com/random/random.git", frappe_branch="random-branch")
is_valid_frappe_branch("https://github.com/frappe/frappe.git", frappe_branch="develop")
is_valid_frappe_branch("https://github.com/frappe/frappe.git", frappe_branch="v13.29.0")
def test_app_states(self):
bench_dir = "./sandbox"

View File

@ -50,6 +50,7 @@ def is_frappe_app(directory: str) -> bool:
return bool(is_frappe_app)
@lru_cache(maxsize=None)
def is_valid_frappe_branch(frappe_path:str, frappe_branch:str):
"""Check if a branch exists in a repo. Throws InvalidRemoteException if branch is not found