def test_visa_form1():
    # Test check method.
    form = VisaForm()
    assert_false(form.check())
    
    form.connection_type = 'GPIB'
    form.address = '1'
    
    assert_true(form.check())
def test_visa_form3():
    # Test check connection_form.
    form = VisaForm()
    form.connection_type = 'GPIB'
    form.address = '1'
    
    assert_equal(form.connection_dict(), 
                 {'connection_type': 'GPIB',
                  'address': '1',
                  'additionnal_mode': ''})
Beispiel #3
0
def test_visa_form3():
    # Test check connection_form.
    form = VisaForm()
    form.connection_type = 'GPIB'
    form.address = '1'

    assert_equal(form.connection_dict(), {
        'connection_type': 'GPIB',
        'address': '1',
        'additionnal_mode': ''
    })
Beispiel #4
0
def test_visa_form1():
    # Test check method.
    form = VisaForm()
    assert_false(form.check())

    form.connection_type = 'GPIB'
    form.address = '1'

    assert_true(form.check())
Beispiel #5
0
def test_visa_form2():
    # Test check required_fields.
    form = VisaForm()
    assert_equal(form.required_fields(), 'connection type and address')
def test_visa_form2():
    # Test check required_fields.
    form = VisaForm()
    assert_equal(form.required_fields(), 'connection type and address')