diff --git a/personal_mnemonic_medium/v2/domain/diff_determiner/test_diff_determiner.py b/personal_mnemonic_medium/v2/domain/diff_determiner/test_diff_determiner.py index 8a922fbe..a215cbc9 100644 --- a/personal_mnemonic_medium/v2/domain/diff_determiner/test_diff_determiner.py +++ b/personal_mnemonic_medium/v2/domain/diff_determiner/test_diff_determiner.py @@ -1,5 +1,3 @@ -from pathlib import Path - from ..prompt_destination.destination_commands import ( DeletePrompts, PushPrompts, @@ -18,10 +16,8 @@ def test_diff_determiner(): assert syncer.only_in_destination() == ["3"] -def test_prompt_diff_determiner(tmp_path: Path): - syncer = PromptDiffDeterminer( - tmp_read_dir=tmp_path, tmp_write_dir=tmp_path - ) +def test_prompt_diff_determiner(): + syncer = PromptDiffDeterminer() source_prompts = [ QAPrompt(question="a", answer="a"), @@ -49,9 +45,5 @@ def test_prompt_diff_determiner(tmp_path: Path): ) ] ), - PushPrompts( - [QAPrompt(question="a", answer="a")], - tmp_write_dir=tmp_path, - tmp_read_dir=tmp_path, - ), + PushPrompts([QAPrompt(question="a", answer="a")]), ] diff --git a/personal_mnemonic_medium/v2/domain/prompt_destination/anki_connect/test_ankiconnect_destination.py b/personal_mnemonic_medium/v2/domain/prompt_destination/anki_connect/test_ankiconnect_destination.py index fd5132c0..35f1751a 100644 --- a/personal_mnemonic_medium/v2/domain/prompt_destination/anki_connect/test_ankiconnect_destination.py +++ b/personal_mnemonic_medium/v2/domain/prompt_destination/anki_connect/test_ankiconnect_destination.py @@ -1,5 +1,4 @@ from collections.abc import Mapping -from pathlib import Path import pytest @@ -49,7 +48,7 @@ def test_ankiconnect_get_all_prompts(fields: Mapping[str, AnkiField]): assert len(prompts) == 1 -def test_ankiconnect_push_prompts(tmpdir: Path): +def test_ankiconnect_push_prompts(): gateway = SpieAnkiconnectGateway() dest = AnkiConnectDestination( gateway=gateway, diff --git a/personal_mnemonic_medium/v2/presentation/cli.py b/personal_mnemonic_medium/v2/presentation/cli.py index 883c6f34..c34259aa 100644 --- a/personal_mnemonic_medium/v2/presentation/cli.py +++ b/personal_mnemonic_medium/v2/presentation/cli.py @@ -47,9 +47,7 @@ def _sync_deck( ) destination_prompts = destination.get_all_prompts() - update_commands = PromptDiffDeterminer( - tmp_write_dir=Path("/tmp"), tmp_read_dir=Path("/tmp") - ).sync( + update_commands = PromptDiffDeterminer().sync( source_prompts=source_prompts, destination_prompts=destination_prompts, )