mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
Fix unused imports and include rule.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from auto_archiver.core import Metadata
|
||||
from auto_archiver.modules.api_db import AAApiDb
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ def mock_media(mocker):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def gsheets_db(mock_gworksheet, setup_module, mocker):
|
||||
def gsheets_db(mock_gworksheet, setup_module, mocker) -> GsheetsFeederDB:
|
||||
mocker.patch("gspread.service_account")
|
||||
config: dict = {
|
||||
"sheet": "testsheet",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
import datetime
|
||||
import hashlib
|
||||
import pytest
|
||||
|
||||
from pytwitter.models.media import MediaVariant
|
||||
@@ -10,7 +9,7 @@ from auto_archiver.modules.twitter_api_extractor import TwitterApiExtractor
|
||||
|
||||
@pytest.mark.incremental
|
||||
class TestTwitterApiExtractor(TestExtractorBase):
|
||||
extractor_module = "twitter_api_extractor"
|
||||
extractor_module: TwitterApiExtractor = "twitter_api_extractor"
|
||||
|
||||
config = {
|
||||
"bearer_tokens": [],
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from typing import Type
|
||||
import pytest
|
||||
from oauth2client import service_account
|
||||
|
||||
from auto_archiver.core import Media
|
||||
from auto_archiver.modules.gdrive_storage import GDriveStorage
|
||||
from auto_archiver.core.metadata import Metadata
|
||||
from tests.storages.test_storage_base import TestStorageBase
|
||||
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ def autoarchiver(tmp_path, monkeypatch, request):
|
||||
def test_run_auto_archiver_no_args(caplog, autoarchiver):
|
||||
with pytest.raises(SystemExit):
|
||||
autoarchiver()
|
||||
|
||||
assert "provide at least one URL via the command line, or set up an alternative feeder" in caplog.text
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import sys
|
||||
import pytest
|
||||
from auto_archiver.core.module import ModuleFactory, LazyBaseModule
|
||||
from auto_archiver.core.base_module import BaseModule
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import pytest
|
||||
import sys
|
||||
from argparse import ArgumentParser, ArgumentTypeError
|
||||
from auto_archiver.core.orchestrator import ArchivingOrchestrator
|
||||
from auto_archiver.version import __version__
|
||||
|
||||
Reference in New Issue
Block a user