File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -637,22 +637,39 @@ def test_pick_invalid(self):
637637 pass
638638
639639 def test_blacklist (self ):
640+ entity = 'https://idp.example.com/saml2/idp/metadata.php'
641+
642+ # First, load without a filter to ensure the entity is there
643+ try :
644+ res , md = self .exec_pipeline (
645+ f"""
646+ - when batch:
647+ - load:
648+ - { self .datadir } /metadata/test01.xml
649+ """
650+ )
651+ except IOError :
652+ pass
653+ print (md .lookup (entity ))
654+ assert md .lookup (entity )
655+
656+ # Then, load with a filter and ensure the entity isn't there anymore
640657 try :
641658 res , md = self .exec_pipeline (
642659 f"""
643660- when batch:
644661 - load:
645- - { self .datadir } /metadata via blacklist_example
662+ - { self .datadir } /metadata/test01.xml via blacklist_example
646663- when blacklist_example:
647664 - fork merge remove:
648665 - filter:
649- - https://idp.example.com/saml2/idp/metadata.php
666+ - { entity }
650667"""
651668 )
652669 except IOError :
653670 pass
654- print (md .lookup ('https://idp.example.com/saml2/idp/metadata.php' ))
655- assert not md .lookup ('https://idp.example.com/saml2/idp/metadata.php' )
671+ print (md .lookup (entity ))
672+ assert not md .lookup (entity )
656673
657674 def test_bad_namespace (self ):
658675 try :
You can’t perform that action at this time.
0 commit comments