Skip to content

Commit

Permalink
Convert AssertTrue to AssertIn
Browse files Browse the repository at this point in the history
  • Loading branch information
Teester committed Jul 4, 2024
1 parent 92e0c2f commit df15221
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions tests/test_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ def test_entityschema_e236(self):
"P27", "P106", "P569", "P4690"]
for prop in properties:
with self.subTest(prop=prop):
self.assertTrue(response.json["properties"][prop]["response"]
in ["correct", "present"])
self.assertIn(response.json["properties"][prop]["response"], ["correct", "present"])

def test_entityschema_e297(self):
"""
Expand All @@ -123,8 +122,7 @@ def test_entityschema_e297(self):
properties: list = ["P2043", "P2067"]
for prop in properties:
with self.subTest(prop=prop):
self.assertTrue(response.json["properties"][prop]["response"] in
["correct", "present"])
self.assertIn(response.json["properties"][prop]["response"], ["correct", "present"])

def test_entityschema_e295(self):
"""
Expand All @@ -140,10 +138,8 @@ def test_entityschema_e295(self):
properties: list = ["P361"]
for prop in properties:
with self.subTest(prop=prop):
self.assertTrue(response.json["properties"][prop]["response"] in
["too many statements"])
self.assertTrue(response.json["properties"][prop]["necessity"] in
["absent"])
self.assertIn(response.json["properties"][prop]["response"], ["too many statements"])
self.assertIn(response.json["properties"][prop]["necessity"], ["absent"])

def test_entityschema_e300(self):
"""
Expand All @@ -159,8 +155,8 @@ def test_entityschema_e300(self):
properties: list = ["P3450"]
for prop in properties:
with self.subTest(prop=prop):
self.assertTrue(response.json["properties"][prop]["response"] in ["present"])
self.assertTrue(response.json["properties"][prop]["necessity"] in ["required"])
self.assertIn(response.json["properties"][prop]["response"], ["present"])
self.assertIn(response.json["properties"][prop]["necessity"], ["required"])

def test_entityschema_e126(self):
"""
Expand Down

0 comments on commit df15221

Please sign in to comment.