def test_columns(self): obje = sanitize.Sanitizer() df = obje.getApplication(url) columns = list(df.columns) try: df_req = df[['reports', 'expenditure', 'active', 'income']] except e: print("Invalid! All necessary columns not found :") print(e)
def test_nullValues(self): obje = sanitize.Sanitizer() df = obje.getApplication(url) boolean = df.isnull().any().any() self.assertFalse(boolean, "Invalid! Null values not allowed")
def test_uniqueapplicationID(self): obje = sanitize.Sanitizer() df = obje.getApplication(url) boolean = not df["ApplicationId"].is_unique self.assertFalse(boolean, "Application ID not unique")
def test_getapplication(self): obje = sanitize.Sanitizer() df = obje.getApplication(url) self.assertEqual(type(df),pd.DataFrame,"Invalid Type")