def test_parse_exception_openssh_configuration(self): scp = Scp(app=None) with pytest.raises(Exception) as inst: scp._parse('/var/www', '/var/www/my-project', 'http://jenkins.backend.com/') assert str(inst.value) == "The OPENSSH_CONFIGURATION parameter was not found, it is required for scp."
def test_parse(self): result = '/usr/bin/scp -o StrictHostKeyChecking=no -o ConnectTimeout=10 -i test_file -r /var/www [email protected]:/var/www/my-project 2>&1' scp = Scp(self.get_data()) command = scp._parse('/var/www', '/var/www/my-project', 'http://jenkins.backend.com/') assert result == command