Encapsulation of tools/special_phrases.py into SpecialPhrasesImporter class and add new tests.

This commit is contained in:
AntoJvlt
2021-03-24 14:26:52 +01:00
parent ff34198569
commit 2c19bd5ea3
9 changed files with 346 additions and 215 deletions

View File

@@ -5,6 +5,7 @@ from pathlib import Path
import psycopg2
import psycopg2.extras
import pytest
import tempfile
SRC_DIR = Path(__file__) / '..' / '..' / '..'
@@ -133,6 +134,13 @@ def def_config():
def src_dir():
return SRC_DIR.resolve()
@pytest.fixture
def tmp_phplib_dir():
with tempfile.TemporaryDirectory() as phpdir:
(Path(phpdir) / 'admin').mkdir()
yield Path(phpdir)
@pytest.fixture
def status_table(temp_db_conn):
""" Create an empty version of the status table and