Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Deprecated tests and created a test for a failed init
Browse files Browse the repository at this point in the history
  • Loading branch information
lempira committed Nov 18, 2024
1 parent 842c072 commit 529d413
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def run_generator(


@pytest.mark.parametrize("language", ["python", "typescript"])
@pytest.mark.skip(reason="This test is deprecated since the template is deprecated")
def test_smart_contract_generator_default_starter_preset(
language: str, working_dir: Path
) -> None:
Expand Down Expand Up @@ -207,6 +208,7 @@ def test_smart_contract_generator_default_starter_preset(


@pytest.mark.parametrize("language", ["python", "typescript"])
@pytest.mark.skip(reason="This test is deprecated since the template is deprecated")
def test_smart_contract_generator_default_production_preset(
language: str, working_dir: Path
) -> None:
Expand Down Expand Up @@ -235,3 +237,17 @@ def test_smart_contract_generator_default_production_preset(

response = check_codebase(working_dir, test_name)
assert response.returncode == 0, response.stdout


def test_template_fail() -> None:
test_name = "production_beaker_smart_contract_fail"

response = run_init(
root,
test_name,
answers={
"preset_name": "starter",
"deployment_language": "python",
},
)
assert response.returncode == 1, response.stdout
2 changes: 2 additions & 0 deletions tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ def get_questions_from_copier_yaml(


@pytest.mark.parametrize(("question_name", "answer"), get_questions_from_copier_yaml())
@pytest.mark.skip(reason="This test is deprecated since the template is deprecated")
def test_parameters(working_dir: Path, question_name: str, answer: str | bool) -> None:
response = run_init_kwargs(working_dir, **{question_name: answer})
assert response.returncode == 0, response.stdout

0 comments on commit 529d413

Please sign in to comment.