Skip to content

Commit

Permalink
Remove broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eadpearce committed Dec 19, 2024
1 parent 5610c63 commit 4b31d92
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions workbaskets/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from datetime import datetime
from typing import Iterable
from unittest.mock import MagicMock
from unittest.mock import patch

import factory
import pytest
from django.conf import settings
from django.utils.timezone import make_aware
Expand Down Expand Up @@ -500,35 +498,3 @@ def test_terminate_missing_measures_check_no_id():
missing_measures_check_task_id=None,
)
assert workbasket.terminate_missing_measures_check() is None


def test_terminate_missing_measures_check_no_task_result():
workbasket = factories.WorkBasketFactory.create(
missing_measures_check_task_id="12345",
)
# sanity check
assert workbasket.missing_measures_check_task_id == "12345"

with patch(
"workbaskets.models.check_workbasket_for_missing_measures.delay",
return_value=None,
):
assert workbasket.terminate_missing_measures_check() is None

assert workbasket.missing_measures_check_task_id == "12345"


def test_terminate_missing_measures_check():
workbasket = factories.WorkBasketFactory.create(
missing_measures_check_task_id="12345",
)
# sanity check
assert workbasket.missing_measures_check_task_id == "12345"

with patch(
"workbaskets.tasks.check_workbasket_for_missing_measures.delay",
return_value=MagicMock(id=factory.Faker("uuid4")),
):
workbasket.terminate_missing_measures_check()

assert workbasket.missing_measures_check_task_id is None

0 comments on commit 4b31d92

Please sign in to comment.