mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-12 21:44:21 -06:00
Try to minimze the database setup
This commit is contained in:
@@ -394,7 +394,6 @@ class TestConsumerFilterDefaults:
|
|||||||
assert filter_obj(Change.added, str(test_file)) is True
|
assert filter_obj(Change.added, str(test_file)) is True
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
|
||||||
class TestConsumeFile:
|
class TestConsumeFile:
|
||||||
"""Tests for the _consume_file function."""
|
"""Tests for the _consume_file function."""
|
||||||
|
|
||||||
@@ -540,7 +539,6 @@ class TestCommandValidation:
|
|||||||
cmd.handle(directory=str(sample_pdf), oneshot=True, testing=False)
|
cmd.handle(directory=str(sample_pdf), oneshot=True, testing=False)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
|
||||||
@pytest.mark.usefixtures("mock_supported_extensions")
|
@pytest.mark.usefixtures("mock_supported_extensions")
|
||||||
class TestCommandOneshot:
|
class TestCommandOneshot:
|
||||||
"""Tests for oneshot mode."""
|
"""Tests for oneshot mode."""
|
||||||
@@ -806,6 +804,7 @@ class TestCommandWatch:
|
|||||||
call_args = mock_consume_file_delay.delay.call_args[0][0]
|
call_args = mock_consume_file_delay.delay.call_args[0][0]
|
||||||
assert call_args.original_file.name == "valid.pdf"
|
assert call_args.original_file.name == "valid.pdf"
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
@pytest.mark.usefixtures("mock_supported_extensions")
|
@pytest.mark.usefixtures("mock_supported_extensions")
|
||||||
def test_stop_flag_stops_consumer(
|
def test_stop_flag_stops_consumer(
|
||||||
self,
|
self,
|
||||||
@@ -827,10 +826,10 @@ class TestCommandWatch:
|
|||||||
assert not thread.is_alive()
|
assert not thread.is_alive()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
|
||||||
class TestCommandWatchPolling:
|
class TestCommandWatchPolling:
|
||||||
"""Tests for polling mode."""
|
"""Tests for polling mode."""
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
def test_polling_mode_works(
|
def test_polling_mode_works(
|
||||||
self,
|
self,
|
||||||
consumption_dir: Path,
|
consumption_dir: Path,
|
||||||
|
|||||||
Reference in New Issue
Block a user