Exemplo n.º 1
0
def test_readDataFromHtmlTable_whenValidTable_thenSuccess():
    assert 40 == len(
        readDataFromHtmlTable(getDataFromUrl(formData=buildFormData('SP')),
                              qtdrow=40))
Exemplo n.º 2
0
def test_getDataFromUrl_whenValidFormData_thenSuccess():
    try:
        getDataFromUrl(formData=buildFormData('SP', 100))
    except:
        assert False
Exemplo n.º 3
0
def test_buildFormData_whenInvalidRows_thenFail():
    with pytest.raises(AssertionError) as e_info:
        buildFormData('SC', -12)
Exemplo n.º 4
0
def test_buildFormData_whenNonPositivoRows_thenAssertionError():
    with pytest.raises(AssertionError) as e_info:
        buildFormData('SC', -2)
Exemplo n.º 5
0
def test_buildFormData_whenNoLenght_thenUseDefault():
    assert buildFormData('DF') == {'UF': 'DF', 'qtdrow': 101}
Exemplo n.º 6
0
def test_buildFormData_whenValidArgs_thenSuccess():
    assert buildFormData('SC', 50) == {'UF': 'SC', 'qtdrow': 51}