#!/usr/bin/env python
# TODO(arc) get this working, doesn't find any tests right now
import os
import sys

import django
import dotenv

dotenv.load_dotenv("aiservice/.env")
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.test_settings"

if __name__ == "__main__":
    from django.conf import settings
    from django.test.utils import get_runner

    django.setup()
    TestRunner = get_runner(settings)
    test_runner = TestRunner()
    failures = test_runner.run_tests(["tests"])
    sys.exit(bool(failures))
