A Python application that validates passwords against defined security requirements using Test-Driven Development (TDD).
This project demonstrates the use of Test-Driven Development (TDD) by implementing a password validation function through incremental test creation and implementation. The application verifies that passwords meet a specified set of security rules and includes an automated test suite.
| File | Description |
|---|---|
check_pwd.py |
Contains the password validation logic |
tests.py |
Contains automated unit tests using Python's unittest framework |
| Feature | Description |
|---|---|
| Length validation | Ensures passwords are between 8 and 20 characters |
| Lowercase requirement | Requires at least one lowercase letter |
| Uppercase requirement | Requires at least one uppercase letter |
| Digit requirement | Requires at least one numeric digit |
| Symbol requirement | Requires at least one approved special character |
| Automated testing | Verifies functionality through unit tests |
git clone https://github.com/desibragg/password-validator-tdd.git
cd password-validator-tddpython tests.pyfrom check_pwd import check_pwd
print(check_pwd("Hello123!")) # True
print(check_pwd("hello123")) # False- Python
- unittest
- Test-Driven Development (TDD)
- Git/GitHub