From 35354c478a8d84b751a28c843117b7be77c7aa04 Mon Sep 17 00:00:00 2001 From: Ivan Hutsuliak Date: Fri, 18 Oct 2024 12:31:52 +0300 Subject: [PATCH 1/2] solution --- app/test_main.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/test_main.py b/app/test_main.py index fa56336..227bf99 100644 --- a/app/test_main.py +++ b/app/test_main.py @@ -1 +1,20 @@ -# write your code here +from app.main import check_password +import pytest + + +@pytest.mark.parametrize( + "password, confirm", + [ + ("asdf", False), + ("asdAAD@@f", False), + ("a48577$#@sdf", False), + ("aA4@", False), + ("1234567890DGGHTgfkhlsh@#$dlkgj", False), + ("aAAdfhg4345@", True) + ] +) +def test_check_password( + password: str, + confirm: bool +) -> None: + assert check_password(password) == confirm From bfc36b278319f7ccac7c21059d79dd975d3207f7 Mon Sep 17 00:00:00 2001 From: Ivan Hutsuliak Date: Fri, 18 Oct 2024 12:33:15 +0300 Subject: [PATCH 2/2] solution --- app/test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test_main.py b/app/test_main.py index 227bf99..cd71525 100644 --- a/app/test_main.py +++ b/app/test_main.py @@ -3,7 +3,7 @@ @pytest.mark.parametrize( - "password, confirm", + "password, confirm", [ ("asdf", False), ("asdAAD@@f", False),