Refactored self-check method, code formatting, small lint fixes (#1942)

This commit is contained in:
Soxoj
2024-12-07 18:05:30 +01:00
committed by GitHub
parent 8b7d8073d9
commit 4b1317789d
22 changed files with 268 additions and 151 deletions
+6 -1
View File
@@ -1,4 +1,5 @@
"""Maigret activation test functions"""
import json
import aiohttp
@@ -41,7 +42,11 @@ async def test_import_aiohttp_cookies():
cookie_jar = import_aiohttp_cookies(cookies_filename)
# new aiohttp support
assert list(cookie_jar._cookies.keys()) in (['xss.is', 'httpbin.org'], [('xss.is', '/'), ('httpbin.org', '/')], [('xss.is', ''), ('httpbin.org', '')])
assert list(cookie_jar._cookies.keys()) in (
['xss.is', 'httpbin.org'],
[('xss.is', '/'), ('httpbin.org', '/')],
[('xss.is', ''), ('httpbin.org', '')],
)
url = 'https://httpbin.org/cookies'
connector = aiohttp.TCPConnector(ssl=False)
+1
View File
@@ -1,4 +1,5 @@
"""Maigret command-line arguments parsing tests"""
from argparse import Namespace
from typing import Dict, Any
+1
View File
@@ -1,4 +1,5 @@
"""Maigret checking logic test functions"""
import pytest
import asyncio
import logging
+1
View File
@@ -1,4 +1,5 @@
"""Maigret main module test functions"""
import asyncio
import copy
+1
View File
@@ -1,4 +1,5 @@
"""Maigret reports test functions"""
import copy
import json
import os
+1
View File
@@ -1,4 +1,5 @@
"""Maigret Database test functions"""
from maigret.sites import MaigretDatabase, MaigretSite
EXAMPLE_DB = {
+1
View File
@@ -1,4 +1,5 @@
"""Maigret utils test functions"""
import itertools
import re