Fixed json report generation bug, bump to 0.2.1

This commit is contained in:
Soxoj
2021-05-02 20:06:15 +03:00
parent ec0d3a1f70
commit 188edc1b7f
8 changed files with 172 additions and 92 deletions
+8
View File
@@ -9,6 +9,7 @@ from maigret.sites import MaigretDatabase
CUR_PATH = os.path.dirname(os.path.realpath(__file__))
JSON_FILE = os.path.join(CUR_PATH, '../maigret/resources/data.json')
TEST_JSON_FILE = os.path.join(CUR_PATH, 'db.json')
empty_mark = Mark('', [], {})
@@ -38,6 +39,13 @@ def default_db():
return db
@pytest.fixture(scope='session')
def test_db():
db = MaigretDatabase().load_from_file(TEST_JSON_FILE)
return db
@pytest.fixture(autouse=True)
def reports_autoclean():
remove_test_reports()