servii-backend/unit_test.py

23 lines
702 B
Python
Raw Normal View History

2024-09-06 15:33:46 +00:00
import asyncio
2024-09-11 02:15:56 +00:00
import os
2024-09-09 22:54:14 +00:00
2024-09-11 02:15:56 +00:00
import file_manager
import firebase_manager
def ban_user(user_id: str):
try:
firebase_manager.auth.update_user(user_id, disabled=False)
2024-08-15 08:49:41 +00:00
print("Banned : " + user_id)
except Exception as e:
2024-08-15 08:49:41 +00:00
print("Error banning user " + user_id, "|", str(e), type(e).__name__)
2024-08-11 09:02:10 +00:00
if __name__ == '__main__':
#ban_user("MpkbDMOO8PQddQgB5VgBQdTMWF53")
2024-08-24 11:38:22 +00:00
#file_manager.log_action("gqZN3eCHF3V2er3Py3rlgk8u2t83", "test", "DeleteServer")
#firebase_manager.set_servers_not_running()
2024-09-11 02:15:56 +00:00
current_dir_content: list[str] = os.listdir(".")
parsed_extension: str = '.py'
print(file_manager.filter_directory_contents(parsed_extension, current_dir_content))