From a4c6faebc2dd8a1ed1c24797c0a065b160c206e8 Mon Sep 17 00:00:00 2001 From: Marco Mariani Date: Wed, 15 Mar 2023 22:48:38 +0100 Subject: [PATCH] Use pytest-cs 0.5.0 --- Pipfile | 2 +- Pipfile.lock | 4 ++-- test/conftest.py | 13 ------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/Pipfile b/Pipfile index a13c7c5..d408687 100644 --- a/Pipfile +++ b/Pipfile @@ -1,6 +1,6 @@ [packages] pytest-dotenv = "*" -pytest-cs = {ref = "0.4.0", git = "https://github.com/crowdsecurity/pytest-cs.git"} +pytest-cs = {ref = "0.5.0", git = "https://github.com/crowdsecurity/pytest-cs.git"} [dev-packages] gnureadline = "*" diff --git a/Pipfile.lock b/Pipfile.lock index f242299..c79bf7c 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "8c87805388996174fc304105c468ddfd5deb342e99ea3c1877c2947b6ab3af8e" + "sha256": "5078fd2793b45c8b9be5306586e0628617d096ae7a5bb3535f48fcd742029b69" }, "pipfile-spec": 6, "requires": { @@ -296,7 +296,7 @@ }, "pytest-cs": { "git": "https://github.com/crowdsecurity/pytest-cs.git", - "ref": "8c49bd8072672c49855a7991a5900858b3ebb777" + "ref": "33c5a611293311b1905983268a38db631fe30852" }, "pytest-datadir": { "hashes": [ diff --git a/test/conftest.py b/test/conftest.py index cd901b8..061cf34 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,12 +1,6 @@ -""" -Full integration test with a real Crowdsec running in Docker -""" - import contextlib import os import pathlib -import secrets -import string import pytest @@ -94,10 +88,3 @@ def closure(**kw): cfg |= cb_cfg_factory(**kw) return cfg yield closure - - -@pytest.fixture(scope='session') -def api_key_factory(): - def closure(alphabet=string.ascii_letters + string.digits): - return ''.join(secrets.choice(alphabet) for i in range(32)) - yield closure