File: test_device_ssh.py

package info (click to toggle)
junos-eznc 2.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,496 kB
  • sloc: xml: 50,219; python: 20,961; makefile: 155; sh: 44; ruby: 2
file content (20 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
__author__ = "rsherman, vnitinv"

import unittest

from jnpr.junos import Device


class TestDeviceSsh(unittest.TestCase):
    def tearDown(self):
        self.dev.close()

    def __test_device_open_key_pass(self):
        self.dev = Device(
            host="xxxx",
            user="jenkins",
            ssh_private_key_file="/var/lib/jenkins/.ssh/passkey",
            passwd="password",
        )
        self.dev.open()
        self.assertEqual(self.dev.connected, True)