def setUpClass(inst): print 'Start of test: test_license_invalid_version' # List of editors i.e. users that do not have admin rights inst.editors = [ 'chloe.anderson', 'chloe.garcia', 'chloe.jackson', 'chloe.johnson', 'chloe.jones', 'chloe.lee' ] # List of managers i.e. users with manager rights inst.managers = [ 'maria.a', 'maria.b', 'maria.c', 'maria.d', 'maria.e', 'maria.f', 'maria.g' ] # List of administrators i.e. users with administrator rights inst.admins = [ 'avaa.johnsona', 'avaa.whitea', 'avac.whitec', 'avad.johnsond', 'avaf.whitef', 'avag.johnsong', 'avag.wilsong' ] # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor() # Delete all existing licenses db_utils.deleteAllLicenses(inst.connection, inst.cur) # Install license with an invalid version number inst.maxUsers = db_utils.addUserLicenseInvalidVersion( inst.connection, inst.cur) print 'License installed with an invalid version'
def setUpClass(inst): print 'Start of test: test_remove_license_table' # List of editors i.e. users that do not have admin rights inst.editors = [ 'chloe.anderson', 'chloe.garcia', 'chloe.jackson', 'chloe.johnson', 'chloe.jones', 'chloe.lee' ] # List of managers i.e. users with manager rights inst.managers = [ 'maria.a', 'maria.b', 'maria.c', 'maria.d', 'maria.e', 'maria.f', 'maria.g' ] # List of administrators i.e. users with administrator rights inst.admins = [ 'avaa.johnsona', 'avaa.whitea', 'avac.whitec', 'avad.johnsond', 'avaf.whitef', 'avag.johnsong', 'avag.wilsong' ] # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor() # Delete all existing licenses db_utils.deleteAllLicenses(inst.connection, inst.cur) # Delete the license table from the database db_utils.deleteLicencesTable(inst.connection, inst.cur) inst.maxUsers = 0 print 'All licenses deleted and license tabble removed from db'
def setUpClass(inst): print 'Start of test: test_valid_license' # List of editors i.e. users that do not have admin rights inst.editors = [ 'chloe.anderson', 'chloe.garcia', 'chloe.jackson', 'chloe.johnson', 'chloe.jones', 'chloe.lee' ] # List of managers i.e. users with manager rights inst.managers = [ 'maria.a', 'maria.b', 'maria.c', 'maria.d', 'maria.e', 'maria.f', 'maria.g', 'maria.h', 'maria.i', 'maria.j', 'maria.k', 'maria.l' ] # List of administrators i.e. users with administrator rights inst.admins = [ 'avaa.johnsona', 'avaa.whitea', 'avac.whitec', 'avad.johnsond', 'avaf.whitef', 'avag.johnsong', 'avag.wilsong', 'avai.robinsoni', 'aval.wilsonl', 'avag.whiteg', 'avah.wilsonh', 'avam.robinsonm' ] # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor() # Delete all existing licenses db_utils.deleteAllLicenses(inst.connection, inst.cur) # Install license for five users and set the value of maxManagers inst.maxUsers = db_utils.addFiveUserLicense(inst.connection, inst.cur) print 'License installed for %d users' % inst.maxUsers
def setUpClass(inst): print 'Start of test: test_emergency_login' # List of administrators i.e. users with administrator rights inst.admins = [ 'avaa.johnsona', 'avaa.whitea', 'avac.whitec', 'avad.johnsond', 'avaf.whitef', 'avag.johnsong', 'avag.wilsong', 'avai.robinsoni', 'aval.wilsonl', 'avag.whiteg' ] # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor()
def setUpClass(inst): print 'Start of test: test_login' # Username to be used for this test username = '******' inst.user = um_utils.user(username, 'quantel@') # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor() # Delete all existing licenses and install license for five users db_utils.deleteAllLicenses(inst.connection, inst.cur) inst.maxUsers = db_utils.addFiveUserLicense(inst.connection, inst.cur) print 'License installed for %d users' % inst.maxUsers
def setUpClass(inst): print 'Start of test: test_remove_license' # Name of administrator to be used for this test inst.admin = 'avaa.johnsona' # Name of editor to be used for this test inst.editor = 'chloe.anderson' # Name of manager to be used for this test inst.manager = 'maria.a' # Set up connection to database inst.connection = db_utils.connectToDb() inst.cur = inst.connection.cursor() # Delete all existing licenses db_utils.deleteAllLicenses(inst.connection, inst.cur)