Example #1
0
def test_classes_Admin_listDiagnosesMadeBeforePrescribingDrug(): 
    '''
    classes.Admin.listDiagnosesMadeBeforePrescribingDrug(self, drug_name):
        print 'Report: Diagnoses Made Before Prescribing ' + drug_name
        result = listDiagnosesMadeBeforePrescribingDrug(drug_name)
        for idx, row in enumerate(result):
            print '-----------------------'
            printRow(row)
        if result != None:
            return True
        else:
            return False
    '''
    adm = AdminStaff(db.getUser('Lgtkejq', 'sygtv{'))
    # if there are diagnoses before drug
    assert adm.listDiagnosesMadeBeforePrescribingDrug("ZMapp") == True
    # if there are no diagnoses before drug
    assert adm.listDiagnosesMadeBeforePrescribingDrug("Heroin") == False
Example #2
0
def test_listDiagnosesMadeBeforePrescribingDrug():
    drug_name = "ZMapp"
    adm = AdminStaff(db.getUser('Lgtkejq', 'sygtv{'))
    assert adm.listDiagnosesMadeBeforePrescribingDrug(drug_name) == True
    drug_name = "Heroin"
    assert adm.listDiagnosesMadeBeforePrescribingDrug(drug_name) == False