Пример #1
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())
Пример #2
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': ''})
Пример #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': ''
    })
Пример #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())
Пример #5
0
def test_visa_form2():
    # Test check required_fields.
    form = VisaForm()
    assert_equal(form.required_fields(), 'connection type and address')
Пример #6
0
def test_visa_form2():
    # Test check required_fields.
    form = VisaForm()
    assert_equal(form.required_fields(), 'connection type and address')