コード例 #1
0
 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)
コード例 #2
0
 def test_nullValues(self):
   obje = sanitize.Sanitizer()
   df = obje.getApplication(url)
   boolean = df.isnull().any().any()
   self.assertFalse(boolean, "Invalid! Null values not allowed")
コード例 #3
0
 def test_uniqueapplicationID(self):
   obje = sanitize.Sanitizer()
   df = obje.getApplication(url)
   boolean = not df["ApplicationId"].is_unique 
   self.assertFalse(boolean, "Application ID not unique")
コード例 #4
0
 def test_getapplication(self):
   obje = sanitize.Sanitizer()
   df = obje.getApplication(url)
   self.assertEqual(type(df),pd.DataFrame,"Invalid Type")