Beispiel #1
0
def test_invalid_no_type():
    key = ' '.join(VALID_RSA_KEY.split(' ')[1:])
    assert is_valid_ssh_key(key) == False
Beispiel #2
0
def test_valid_multiple_keys():
    assert is_valid_ssh_key(\
        VALID_RSA_KEY + \
        VALID_DSA_KEY + \
        VALID_ED25519_KEY + \
        VALID_ECDSA_KEY)
Beispiel #3
0
def test_invalid_no_spaces():
    key = VALID_RSA_KEY.replace(' ', '')
    assert is_valid_ssh_key(key) == False
Beispiel #4
0
def test_valid_key_with_trailing_line_breaks():
    assert is_valid_ssh_key(\
        VALID_RSA_KEY + \
        "\n\n")
Beispiel #5
0
def test_valid_ecdsa():
    assert is_valid_ssh_key(VALID_ECDSA_KEY)
Beispiel #6
0
def test_valid_ed25519():
    assert is_valid_ssh_key(VALID_ED25519_KEY)
Beispiel #7
0
def test_valid_dsa():
    assert is_valid_ssh_key(VALID_DSA_KEY)
Beispiel #8
0
def test_valid_rsa():
    assert is_valid_ssh_key(VALID_RSA_KEY)