seed: curriculum content
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
from solution import validate
|
||||
|
||||
|
||||
def test_strong_password():
|
||||
r = validate("Andromeda1")
|
||||
assert r == {
|
||||
"length": 10,
|
||||
"long_enough": True,
|
||||
"starts_capital": True,
|
||||
"ends_digit": True,
|
||||
}
|
||||
|
||||
|
||||
def test_short_lowercase_no_digit():
|
||||
r = validate("abc")
|
||||
assert r == {
|
||||
"length": 3,
|
||||
"long_enough": False,
|
||||
"starts_capital": False,
|
||||
"ends_digit": False,
|
||||
}
|
||||
|
||||
|
||||
def test_capital_no_digit():
|
||||
r = validate("Hello")
|
||||
assert r == {
|
||||
"length": 5,
|
||||
"long_enough": False,
|
||||
"starts_capital": True,
|
||||
"ends_digit": False,
|
||||
}
|
||||
|
||||
|
||||
def test_long_lowercase_with_digit():
|
||||
r = validate("spaceX2026")
|
||||
assert r == {
|
||||
"length": 10,
|
||||
"long_enough": True,
|
||||
"starts_capital": False,
|
||||
"ends_digit": True,
|
||||
}
|
||||
Reference in New Issue
Block a user