mailinabox/test/test_ssh.py

14 lines
290 B
Python
Raw Normal View History

2016-12-11 15:00:04 +00:00
import pytest
from settings import *
def test_ssh_banner():
"""SSH is responding with its banner"""
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TEST_SERVER, TEST_PORT))
data = s.recv(1024)
s.close()
assert data.startswith("SSH-2.0-OpenSSH")