aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorBonfaceKilz2022-04-12 13:24:08 +0300
committerBonfaceKilz2022-04-12 13:26:57 +0300
commit39afc680ea3eac81a2e5fff763c1cd1a51156bb5 (patch)
treed3be1a727d9563fd007210fad42f269846c17a69 /tests/unit
parent789d483fe8877c08a07d0f94cb22e3e33a5888bc (diff)
downloadgenenetwork3-39afc680ea3eac81a2e5fff763c1cd1a51156bb5.tar.gz
Delete "get_allowable_sampledata_headers"
* gn3/csvcmp.py (get_allowable_sampledata_headers): Delete it. * tests/unit/test_csvcmp.py: Remove "get_allowable_sampledata_headers" import. (test_get_allowable_csv_headers): Delete it.
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_csvcmp.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/unit/test_csvcmp.py b/tests/unit/test_csvcmp.py
index c8b69c7..92012d3 100644
--- a/tests/unit/test_csvcmp.py
+++ b/tests/unit/test_csvcmp.py
@@ -6,7 +6,6 @@ from gn3.csvcmp import csv_diff
from gn3.csvcmp import extract_invalid_csv_headers
from gn3.csvcmp import extract_strain_name
from gn3.csvcmp import fill_csv
-from gn3.csvcmp import get_allowable_sampledata_headers
from gn3.csvcmp import parse_csv_column
from gn3.csvcmp import remove_insignificant_edits
@@ -124,41 +123,6 @@ def test_extract_strain_name():
@pytest.mark.unit_test
-def test_get_allowable_csv_headers(mocker):
- """Test that all the csv headers are fetched properly"""
- mock_conn = mocker.MagicMock()
- expected_values = [
- "Strain Name",
- "Value",
- "SE",
- "Count",
- "Condition",
- "Tissue",
- "Sex",
- "Age",
- "Ethn.",
- "PMI (hrs)",
- "pH",
- "Color",
- ]
- with mock_conn.cursor() as cursor:
- cursor.fetchall.return_value = (
- ("Condition",),
- ("Tissue",),
- ("Sex",),
- ("Age",),
- ("Ethn.",),
- ("PMI (hrs)",),
- ("pH",),
- ("Color",),
- )
- assert get_allowable_sampledata_headers(mock_conn) == expected_values
- cursor.execute.assert_called_once_with(
- "SELECT Name from CaseAttribute"
- )
-
-
-@pytest.mark.unit_test
def test_extract_invalid_csv_headers_with_some_wrong_headers():
"""Test that invalid column headers are extracted correctly from a csv
string"""