File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -99,20 +99,23 @@ def test_object_inventory(app, cached_etree_parse):
9999 with inventory_file .open ('rb' ) as f :
100100 inv = InventoryFile .load (f , 'test/path' , posixpath .join )
101101
102- assert 'sample-directive-opts' in inv .get ('commands:command' )
102+ directive_opts = inv .get ('commands:command' ).get ('sample-directive-opts' , None )
103+ assert directive_opts is not None
103104 assert (
104105 'test/path/index.html#sample-directive-opts'
105- == inv [ 'commands:command' ][ 'sample-directive-opts' ][ 2 ]
106+ == directive_opts . uri
106107 )
107108
108- assert 'sample-directive-opts A' in inv .get ('commands:command' )
109+ directive_opts_a = inv .get ('commands:command' ).get ('sample-directive-opts A' , None )
110+ assert directive_opts_a is not None
109111 assert (
110112 'test/path/subcommand-a.html#sample-directive-opts-A'
111- == inv [ 'commands:command' ][ 'sample-directive-opts A' ][ 2 ]
113+ == directive_opts_a . uri
112114 )
113115
114- assert 'sample-directive-opts B' in inv .get ('commands:command' )
116+ directive_opts_b = inv .get ('commands:command' ).get ('sample-directive-opts B' , None )
117+ assert directive_opts_b is not None
115118 assert (
116119 'test/path/index.html#sample-directive-opts-B'
117- == inv [ 'commands:command' ][ 'sample-directive-opts B' ][ 2 ]
120+ == directive_opts_b . uri
118121 )
You can’t perform that action at this time.
0 commit comments