Esempio n. 1
0
 def __init__(self, verbosity=1, failfast=False, keepdb=False, **_):
     self.verbosity = verbosity
     self.failfast = failfast
     self.keepdb = keepdb
     settings.TEST = True
     settings.CELERY_TASK_ALWAYS_EAGER = True
     CONFIG.y_set("authentik.avatars", "none")
Esempio n. 2
0
    def __init__(self, verbosity=1, failfast=False, keepdb=False, **kwargs):
        self.verbosity = verbosity
        self.failfast = failfast
        self.keepdb = keepdb

        self.args = ["-vv"]
        if self.failfast:
            self.args.append("--exitfirst")
        if self.keepdb:
            self.args.append("--reuse-db")

        if kwargs.get("randomly_seed", None):
            self.args.append(f"--randomly-seed={kwargs['randomly_seed']}")

        settings.TEST = True
        settings.CELERY_TASK_ALWAYS_EAGER = True
        CONFIG.y_set("avatars", "none")
        CONFIG.y_set("geoip", "tests/GeoLite2-City-Test.mmdb")
        CONFIG.y_set(
            "outposts.container_image_base",
            f"ghcr.io/goauthentik/dev-%(type)s:{get_docker_tag()}",
        )