The assertions are to caught programmer's error, not usage error. So, asserting the the passphrase is a str is ok, but asserting that the user provided a short password is not. You should have a SoledadPasswordTooShort exception or something like that.