Skip to content

Commit

Permalink
addressed the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nargis Sultani committed Sep 12, 2023
1 parent 8285ca5 commit 073db36
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/tests/test_check_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pandas as pd
import pytest

from validator import global_data
from validator.check_functions import (
Expand All @@ -22,7 +21,6 @@
meets_multi_value_field_restriction,
string_contains,
)
from validator.checks import SBLCheck


class TestInvalidDateFormat:
Expand Down Expand Up @@ -870,27 +868,3 @@ def test_with_incorrect_values(self):
)
is False
)


class TestSBLCheck:
def test_no_id_check(self):
with pytest.raises(Exception) as exc:
SBLCheck(lambda: True, warning=True, name="Just a Warning")

assert "Each check must be assigned a `name` and an `id`." in str(exc.value)
assert exc.type == ValueError

def test_no_name_check(self):
with pytest.raises(Exception) as exc:
SBLCheck(lambda: True, id="00000", warning=True)

assert "Each check must be assigned a `name` and an `id`." in str(exc.value)
assert exc.type == ValueError

def test_name_and_id_check(self):
raised = False
try:
SBLCheck(lambda: True, id="00000", warning=True, name="Just a Warning")
except ValueError:
raised = True
assert raised is False

0 comments on commit 073db36

Please sign in to comment.