Пример #1
0
def test_For_Test_Case_to_pass_report_number_of_states_sorted_TC_5_1():
    censusfile = 'StateCensusData.csv'
    codefile = 'StateCode.csv'
    ''' Number of States Count Before Sorting'''
    numberOfStatesBeforeSorting = csvdata().getNumberofrecordes_censusdata(
        censusfile)
    ''' Number of States Count After Sorting'''
    numberOfStatesAfterSorting = handler(
        censusfile, codefile).check_recordsCountAfterSorted()

    assert numberOfStatesAfterSorting == numberOfStatesBeforeSorting
Пример #2
0
def test_Given_the_State_Census_CSV_File_when_correct_but_type_incorrect_Returns_a_custom_Exception_TC_2_3(
):
    wrongFiletype = 'StateCode.txt'

    # with pytest.raises(FileNotFoundError):
    csvdata().getNumberofrecordes_statecode(wrongFiletype)
Пример #3
0
def test_Given_the_State_Code_CSV_File_if_incorrect_Returns_a_custom_Exception_TC_2_2(
):
    wrongFilepath = 'StateCode.csv'

    # with pytest.raises(FileNotCorrectException):
    csvdata().getNumberofrecordes_statecode(wrongFilepath)
Пример #4
0
def test_Happy_Test_Case_where_the_records_are_checked_TC_2_1():
    correctFilepath = 'StateCode.csv'
    wrongFilepath = 'StateCensusData1.csv'
    assert csvdata().getNumberofrecordes_statecode(correctFilepath) == 37
Пример #5
0
def test_Given_the_State_Census_CSV_File_if_incorrect_Returns_a_custom_Exception_TC_1_2(
):
    wrongFilepath = 'StateCensusData.csv'

    # with pytest.raises(FileNotCorrectException):
    csvdata().getNumberofrecordes_censusdata(wrongFilepath)