Skip to content

Commit 1c386aa

Browse files
🟢 Add test with implicit self-reference
1 parent a90c5f3 commit 1c386aa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

frictionless/resources/__spec__/table/test_schema.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ def test_resource_schema_self_referencing_foreign_keys(test_case):
293293
resource, test_case["expected_validity"], test_case["expected_errors"]
294294
)
295295

296+
# Same test but with implicit self-reference
297+
descriptor["schema"]["foreignKeys"][0]["reference"].pop("resource", None)
298+
299+
resource = TableResource.from_descriptor(descriptor)
300+
301+
_handle_expected_validity_and_errors(
302+
resource, test_case["expected_validity"], test_case["expected_errors"]
303+
)
304+
296305

297306
@pytest.mark.parametrize(
298307
"test_case",

0 commit comments

Comments
 (0)