Esempio n. 1
0
def test_importerPlayers(excel_players):
    log = Log('test.log')
    importer = ImporterPlayers(excel_players, log)
    requiredColumns = ([
        'FirstName',
        'LastName',
        'Position',
        'DOB',
        'Hometown'
    ])
    assert importer.checkFields(requiredColumns) is True
    assert importer.doImport() is True
Esempio n. 2
0
def importPlayers(infile):
    # Feedback, setup
    print('Importing players from ' + str(infile))
    log = Log('trapp-import-players.log')
    importer = ImporterPlayers(infile, log)

    # Check for required fields
    requiredColumns = ([
        'FirstName',
        'LastName',
        'Position',
        'DOB',
        'Hometown'
    ])
    importer.checkFields(requiredColumns)

    # Do the import
    importer.doImport()

    # Shutdown
    log.end()

    return True