Skip to content

Commit

Permalink
chore: patching tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Jul 8, 2024
1 parent 5d319d3 commit a2f56d2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 34 deletions.
22 changes: 4 additions & 18 deletions tests/init/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from prompt_toolkit.input import PipeInput
from pytest_mock import MockerFixture

from tests import get_combined_verify_output
from tests.utils.approvals import TokenScrubber, combine_scrubbers, verify
from tests.utils.click_invoker import invoke
from tests.utils.proc_mock import ProcMock
Expand Down Expand Up @@ -616,11 +615,8 @@ def test_init_with_any_template_url_get_community_warning(
Path("myapp") / "smart_contracts",
}
)
env_template_file_contents = (cwd / "myapp" / ".env.template").read_text()
verify(
get_combined_verify_output(
result.output, additional_name=".env.template", additional_output=env_template_file_contents
),
result.output,
scrubber=make_output_scrubber(),
)

Expand All @@ -643,11 +639,8 @@ def test_init_with_any_template_url_get_community_warning_with_unsafe_tag(tmp_pa
Path("myapp") / "smart_contracts",
}
)
env_template_file_contents = (cwd / "myapp" / ".env.template").read_text()
verify(
get_combined_verify_output(
result.output, additional_name=".env.template", additional_output=env_template_file_contents
),
result.output,
scrubber=make_output_scrubber(),
)

Expand Down Expand Up @@ -700,11 +693,8 @@ def test_init_with_official_template_name(tmp_path_factory: TempPathFactory) ->
Path("myapp") / "smart_contracts",
}
)
env_template_file_contents = (cwd / "myapp" / ".env.template").read_text()
verify(
get_combined_verify_output(
result.output, additional_name=".env.template", additional_output=env_template_file_contents
),
result.output,
scrubber=make_output_scrubber(),
)

Expand Down Expand Up @@ -751,15 +741,11 @@ def test_init_with_custom_env(tmp_path_factory: TempPathFactory) -> None:
Path("myapp"),
Path("myapp") / "README.md",
Path("myapp") / "smart_contracts",
Path("myapp") / ".env.template",
}
)
env_template_file_contents = (cwd / "myapp" / ".env.template").read_text()

verify(
get_combined_verify_output(
result.output, additional_name=".env.template", additional_output=env_template_file_contents
),
result.output,
scrubber=make_output_scrubber(),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ DEBUG: No .algokit.toml file found in the project directory.
Your selected template comes from:
➡️ https://github.com/algorandfoundation/algokit-beaker-default-template
Your template includes a README.md file, you might want to review that as a next step.
----
.env.template:
----
# this file should contain environment variables common to all environments/networks
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,3 @@ DEBUG: No .algokit.toml file found in the project directory.
Your selected template comes from:
➡️ https://github.com/algorandfoundation/algokit-beaker-default-template
Your template includes a README.md file, you might want to review that as a next step.
----
.env.template:
----
# this file should contain environment variables common to all environments/networks
4 changes: 0 additions & 4 deletions tests/init/test_init.test_init_with_custom_env.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ DEBUG: No .algokit.toml file found in the project directory.
Your selected template comes from:
➡️ https://github.com/algorandfoundation/algokit-beaker-default-template
Your template includes a README.md file, you might want to review that as a next step.
----
.env.template:
----
# this file should contain environment variables common to all environments/networks
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ DEBUG: No .algokit.toml file found in the project directory.
Your selected template comes from:
➡️ https://github.com/algorandfoundation/algokit-beaker-default-template
Your template includes a README.md file, you might want to review that as a next step.
----
.env.template:
----
# this file should contain environment variables common to all environments/networks

0 comments on commit a2f56d2

Please sign in to comment.