From 17c1c9c3605e5b639efb2499c6edcf22847c1c23 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Fri, 17 Jan 2025 12:02:38 +0100 Subject: [PATCH] Fix up core unit tests when a twitter api key isn't provided --- pyproject.toml | 1 + tests/archivers/test_twitter_api_archiver.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 995024a..0cd5f8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,4 +74,5 @@ documentation = "https://github.com/bellingcat/auto-archiver" [tool.pytest.ini_options] markers = [ "download: marks tests that download content from the network", + "incremental: marks a class to run tests incrementally. If a test fails in the class, the remaining tests will be skipped", ] \ No newline at end of file diff --git a/tests/archivers/test_twitter_api_archiver.py b/tests/archivers/test_twitter_api_archiver.py index fae1780..c8009f1 100644 --- a/tests/archivers/test_twitter_api_archiver.py +++ b/tests/archivers/test_twitter_api_archiver.py @@ -14,7 +14,7 @@ class TestTwitterApiArchiver(TestArchiverBase): archiver_class = TwitterApiArchiver config = { "bearer_tokens": [], - "bearer_token": os.environ.get("TWITTER_BEARER_TOKEN"), + "bearer_token": os.environ.get("TWITTER_BEARER_TOKEN", "TEST_KEY"), "consumer_key": os.environ.get("TWITTER_CONSUMER_KEY"), "consumer_secret": os.environ.get("TWITTER_CONSUMER_SECRET"), "access_token": os.environ.get("TWITTER_ACCESS_TOKEN"),