예제 #1
0
def main(argv):
    """
    The main program
    """

    try:
        #pylint: disable=unused-variable
        opts, args = getopt.getopt(argv, "h", ["help"])

    except getopt.GetoptError:
        usage()

    #pylint: disable=unused-variable
    for opt, val in opts:
        if opt in ('-h', '--help'):
            usage()

    print('Testing the machines')
    my_host = Machine()
    my_host.set_name('hurukan')
    my_host.set_ip_nbr('132.166.28.183')

    print(my_host.get_id())
예제 #2
0
파일: test_machines.py 프로젝트: jplf/jplab
def test_get_id():
    """ Returns the identity of the machine """
    host = Machine()
    assert host.get_id() == 'Host : localhost 127.0.0.1'