Minor changes to tests.

stix2.1
Emmanuelle Vargas-Gonzalez 2018-07-25 12:43:08 -04:00
parent ea15b6f795
commit 40d656c94c
2 changed files with 1 additions and 15 deletions

View File

@ -34,8 +34,6 @@ def test_confidence_range_none_low_med_high():
assert value_to_none_low_medium_high(val) == "Med"
elif _between(100, val, 70):
assert value_to_none_low_medium_high(val) == "High"
else:
pytest.fail("Unexpected behavior %s" % val)
@pytest.mark.parametrize(
@ -98,8 +96,6 @@ def test_confidence_range_zero_ten():
assert value_to_zero_ten(val) == "9"
elif _between(100, val, 95):
assert value_to_zero_ten(val) == "10"
else:
pytest.fail("Unexpected behavior %s" % val)
@pytest.mark.parametrize(
@ -157,8 +153,6 @@ def test_confidence_range_admiralty_credibility():
assert value_to_admiralty_credibility(val) == "2 - Probably True"
elif _between(100, val, 80):
assert value_to_admiralty_credibility(val) == "1 - Confirmed by other sources"
else:
pytest.fail("Unexpected behavior %s" % val)
@pytest.mark.parametrize(
@ -214,8 +208,6 @@ def test_confidence_range_wep():
assert value_to_wep(val) == "Highly likely/Almost Certain"
elif val == 100:
assert value_to_wep(val) == "Certain"
else:
pytest.fail("Unexpected behavior %s" % val)
@pytest.mark.parametrize(
@ -273,8 +265,6 @@ def test_confidence_range_dni():
assert value_to_dni(val) == "Very Likely / Highly Probable"
elif _between(100, val, 90):
assert value_to_dni(val) == "Almost Certain / Nearly Certain"
else:
pytest.fail("Unexpected behavior %s" % val)
@pytest.mark.parametrize(

View File

@ -311,11 +311,7 @@ def test_dictionary_property_valid(d):
)
def test_dictionary_no_longer_raises(d):
dict_prop = DictionaryProperty(spec_version='2.1')
try:
dict_prop.clean(d[0])
except DictionaryKeyError:
pytest.fail("Unexpected DictionaryKeyError...")
dict_prop.clean(d[0])
@pytest.mark.parametrize(