diff options
| author | Munyoki Kilyungi | 2025-06-25 14:53:53 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-07-07 07:58:31 +0300 |
| commit | 13cda1f32ba613e1fefb80d323dfaa4fab7d45f6 (patch) | |
| tree | 49467a99279ac5abd58601b6152b17c77d7fc9fe | |
| parent | 4fb7cfabb0b327650be4eb2853719f3602bfc5ba (diff) | |
| download | genenetwork3-13cda1f32ba613e1fefb80d323dfaa4fab7d45f6.tar.gz | |
Delete "get_unreviewed_diffs."
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| -rw-r--r-- | gn3/db/case_attributes.py | 10 | ||||
| -rw-r--r-- | tests/unit/db/test_case_attributes.py | 15 |
2 files changed, 0 insertions, 25 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py index dc8833b..6bb8b4b 100644 --- a/gn3/db/case_attributes.py +++ b/gn3/db/case_attributes.py @@ -79,16 +79,6 @@ def queue_edit(cursor, directory: Path, edit: CaseAttributeEdit) -> int: return review_ids -def get_unreviewed_diffs(conn: Any) -> Optional[tuple]: - """Fetch all case attributes in GN""" - with conn.cursor() as cursor: - cursor.execute( - "SELECT id, editor, json_diff_data FROM " - "caseattributes_audit WHERE status = 'review'" - ) - return cursor.fetchall() - - def insert_case_attribute_audit( conn: Any, status: str, author: str, data: str ) -> int: diff --git a/tests/unit/db/test_case_attributes.py b/tests/unit/db/test_case_attributes.py index bd6f1ce..17219c6 100644 --- a/tests/unit/db/test_case_attributes.py +++ b/tests/unit/db/test_case_attributes.py @@ -6,7 +6,6 @@ import os from pytest_mock import MockFixture from gn3.db.case_attributes import queue_edit from gn3.db.case_attributes import CaseAttributeEdit -from gn3.db.case_attributes import get_unreviewed_diffs from gn3.db.case_attributes import insert_case_attribute_audit from gn3.db.case_attributes import approve_case_attribute from gn3.db.case_attributes import reject_case_attribute @@ -32,20 +31,6 @@ def test_queue_edit(mocker: MockFixture) -> None: @pytest.mark.unit_test -def test_get_unreviewed_diffs(mocker: MockFixture) -> None: - """Test that the correct query is called when fetching unreviewed - case-attributes diff""" - mock_conn = mocker.MagicMock() - with mock_conn.cursor() as cursor: - _ = get_unreviewed_diffs(mock_conn) - cursor.fetchall.return_value = ((1, "editor", "diff_data_1"),) - cursor.execute.assert_called_once_with( - "SELECT id, editor, json_diff_data FROM " - "caseattributes_audit WHERE status = 'review'" - ) - - -@pytest.mark.unit_test def test_insert_case_attribute_audit(mocker: MockFixture) -> None: """Test that the updating case attributes uses the correct query""" mock_conn = mocker.MagicMock() |
