def test_invalid_no_type(): key = ' '.join(VALID_RSA_KEY.split(' ')[1:]) assert is_valid_ssh_key(key) == False
def test_valid_multiple_keys(): assert is_valid_ssh_key(\ VALID_RSA_KEY + \ VALID_DSA_KEY + \ VALID_ED25519_KEY + \ VALID_ECDSA_KEY)
def test_invalid_no_spaces(): key = VALID_RSA_KEY.replace(' ', '') assert is_valid_ssh_key(key) == False
def test_valid_key_with_trailing_line_breaks(): assert is_valid_ssh_key(\ VALID_RSA_KEY + \ "\n\n")
def test_valid_ecdsa(): assert is_valid_ssh_key(VALID_ECDSA_KEY)
def test_valid_ed25519(): assert is_valid_ssh_key(VALID_ED25519_KEY)
def test_valid_dsa(): assert is_valid_ssh_key(VALID_DSA_KEY)
def test_valid_rsa(): assert is_valid_ssh_key(VALID_RSA_KEY)