about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gn3/db/case_attributes.py17
-rw-r--r--tests/unit/db/test_case_attributes.py17
2 files changed, 0 insertions, 34 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py
index c839214..ea3bf27 100644
--- a/gn3/db/case_attributes.py
+++ b/gn3/db/case_attributes.py
@@ -79,23 +79,6 @@ def queue_edit(cursor, directory: Path, edit: CaseAttributeEdit) -> int:
         return review_ids
 
 
-def reject_case_attribute(conn: Any, case_attr_audit_id: int) -> int:
-    """Given the id of the json_diff in the case_attribute_audit table, reject
-    it"""
-    rowcount = 0
-    try:
-        with conn.cursor() as cursor:
-            cursor.execute(
-                "UPDATE caseattributes_audit SET "
-                "status = 'rejected' WHERE id = %s",
-                (case_attr_audit_id,),
-            )
-            rowcount = cursor.rowcount
-    except Exception as _e:
-        raise MySQLdb.Error(_e) from _e
-    return rowcount
-
-
 def approve_case_attribute(conn: Any, case_attr_audit_id: int) -> int:
     """Given the id of the json_diff in the case_attribute_audit table,
     approve it
diff --git a/tests/unit/db/test_case_attributes.py b/tests/unit/db/test_case_attributes.py
index 80e199a..5617362 100644
--- a/tests/unit/db/test_case_attributes.py
+++ b/tests/unit/db/test_case_attributes.py
@@ -7,7 +7,6 @@ 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 approve_case_attribute
-from gn3.db.case_attributes import reject_case_attribute
 
 
 @pytest.mark.unit_test
@@ -30,22 +29,6 @@ def test_queue_edit(mocker: MockFixture) -> None:
 
 
 @pytest.mark.unit_test
-def test_reject_case_attribute(mocker: MockFixture) -> None:
-    """Test rejecting a case-attribute"""
-    mock_conn = mocker.MagicMock()
-    with mock_conn.cursor() as cursor:
-        _ = reject_case_attribute(
-            mock_conn,
-            case_attr_audit_id=1,
-        )
-        cursor.execute.assert_called_once_with(
-            "UPDATE caseattributes_audit SET "
-            "status = 'rejected' WHERE id = %s",
-            (1,),
-        )
-
-
-@pytest.mark.unit_test
 def test_approve_inserting_case_attribute(mocker: MockFixture) -> None:
     """Test approving inserting a case-attribute"""
     mock_conn = mocker.MagicMock()