File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2662,6 +2662,8 @@ def test__detect_relationships_semantic_foreign_key(self):
26622662 ]
26632663 assert instance .relationships == expected_relationships
26642664 assert instance .tables ['child' ].columns ['email' ] == {'sdtype' : 'email' , 'pii' : True }
2665+ assert instance .tables ['parent' ].columns ['email' ] == {'sdtype' : 'email' }
2666+ assert instance .tables ['parent' ].primary_key == 'email'
26652667
26662668 def test__detect_relationships_semantic_foreign_key_does_not_overwrite_mismatch (self ):
26672669 """Test semantic foreign key mismatches do not coerce the child sdtype."""
@@ -2691,7 +2693,9 @@ def test__detect_relationships_semantic_foreign_key_does_not_overwrite_mismatch(
26912693
26922694 # Assert
26932695 assert instance .relationships == []
2694- assert instance .tables ['child' ].columns ['email' ]['sdtype' ] == 'categorical'
2696+ assert instance .tables ['child' ].columns ['email' ] == {'sdtype' : 'categorical' }
2697+ assert instance .tables ['parent' ].columns ['email' ] == {'sdtype' : 'email' }
2698+ assert instance .tables ['parent' ].primary_key == 'email'
26952699
26962700 def test__detect_relationships_restores_foreign_key_metadata_after_failure (self ):
26972701 """Test failed detection restores all original metadata values in the child foreign key."""
You can’t perform that action at this time.
0 commit comments