示例#1
0
def test_dictSpecifyBounds():
    wbDict = readExcel.workbookToDict(path1, boundsDict1)
    assert type(wbDict) == dict
    for sheet in wbDict.values():
        assert type(sheet) == dict
        for row in sheet.values():
            assert type(row) == dict
            assert len(row) > 0
示例#2
0
def test_dictSourceNum():
    wbDict = readExcel.workbookToDict(path, 1)
    assert type(wbDict) == dict
    for sheet in wbDict.values():
        assert type(sheet) == dict
        for row in sheet.values():
            assert type(row) == dict
            assert len(row) > 0
示例#3
0
def test_reportDefaults():
    wbDict = readExcel.workbookToDict(path)
    result = readExcel.jobReport(
        wbDict,
        1,
    )
    print(result)
    assert type(result) == str
示例#4
0
def test_dictSpecifySomeBounds():
    boundsDict = {
        "Jobs": {
            "minRow": 1,
            "maxRow": 100
        },
        "Keywords": {
            "minRow": 1,
            "minCol": 1
        },
        "Job-Keywords": {
            "maxRow": 100,
            "maxCol": 100
        },
    }
    wbDict = readExcel.workbookToDict(path, boundsDict)
    assert type(wbDict) == dict
    for sheet in wbDict.values():
        assert type(sheet) == dict
        for row in sheet.values():
            assert type(row) == dict
            assert len(row) > 0
示例#5
0
def test_report():
    wbDict = readExcel.workbookToDict(path)
    jobFields = ("Company", "Location", "Job Title", "Application Date")
    connectionFields = ("Name", "Job Title")
    keywordFields = ("Keyword", "Type")
    result = readExcel.jobReport(
        wbDict,
        1,
        "Jobs",
        "ID",
        jobFields,
        "Company",
        "Connections",
        connectionFields,
        "JobID",
        "Job-Keywords",
        "Keyword",
        "Keywords",
        keywordFields,
        "Job",
    )
    print(result)
    assert type(result) == str
示例#6
0
def test_match():
    wbDict = readExcel.workbookToDict(path)
    result = readExcel.matching(wbDict, "Connections", "Company", "Amazon")
    print(result)
    assert type(result) == list