示例#1
0
 def test_remove_account_NoExistAccount(self):
     temp_db_path_correct = "C:/Users/Admin/PycharmProjects/ta_app/DB_Files/accounts.csv"
     account2 = Account()
     account2.user = "******"
     account2.password = "******"
     account2.role = "TA"
     self.db_connection = DBConnection()
     self.assertTrue(self.db_connection.connect(temp_db_path_correct))
     self.assertTrue(self.db_connection.is_connected)
     self.assertEqual(temp_db_path_correct, self.db_connection.db_path)
     self.assertTrue(self.db_connection.add_account(self.account_correct))
     self.assertFalse(self.db_connection.remove_account(account2))
 def test_account4(self):
     ac = Account("test4User", "test4Password", "Supervisor")
     with self.assertRaises(ValueError):
         ac.user = ""