55import uuid
66
77# Test for `zot items list`
8- def test_item_list_default_json_output (runner : CliRunner ):
8+ def test_item_list_default_json_output (runner : CliRunner , active_profile_with_real_credentials ):
99 """Test `zot items list` returns JSON by default and is not empty."""
1010 result = runner .invoke (zot , ['items' , 'list' , '--limit' , '1' ])
1111 assert result .exit_code == 0
@@ -19,7 +19,7 @@ def test_item_list_default_json_output(runner: CliRunner):
1919 except json .JSONDecodeError :
2020 pytest .fail ("Output was not valid JSON." )
2121
22- def test_item_list_top_flag (runner : CliRunner ):
22+ def test_item_list_top_flag (runner : CliRunner , active_profile_with_real_credentials ):
2323 """Test `zot items list --top`."""
2424 result = runner .invoke (zot , ['items' , 'list' , '--top' , '--limit' , '1' ])
2525 assert result .exit_code == 0
@@ -29,7 +29,7 @@ def test_item_list_top_flag(runner: CliRunner):
2929 except json .JSONDecodeError :
3030 pytest .fail ("Output was not valid JSON for --top flag." )
3131
32- def test_item_list_output_table (runner : CliRunner ):
32+ def test_item_list_output_table (runner : CliRunner , active_profile_with_real_credentials ):
3333 """Test `zot items list --output table`."""
3434 result = runner .invoke (zot , ['items' , 'list' , '--limit' , '1' , '--output' , 'table' ])
3535 assert result .exit_code == 0
@@ -71,7 +71,7 @@ def test_item_get_single_item(runner: CliRunner, temp_item_with_tags):
7171 except json .JSONDecodeError :
7272 pytest .fail ("Output was not valid JSON for item get." )
7373
74- def test_item_get_non_existent_item (runner : CliRunner ):
74+ def test_item_get_non_existent_item (runner : CliRunner , active_profile_with_real_credentials ):
7575 """Test `zot items get <item_key>` for a non-existent item."""
7676 non_existent_key = "NONEXIST" # A key that is unlikely to exist
7777 result = runner .invoke (zot , ['items' , 'get' , non_existent_key ])
@@ -478,7 +478,7 @@ def test_item_children(runner: CliRunner, zot_instance):
478478 print (f"Error cleaning up parent item { parent_item_key } : { e_parent } " )
479479
480480# Test for `items count`
481- def test_item_count (runner : CliRunner ):
481+ def test_item_count (runner : CliRunner , active_profile_with_real_credentials ):
482482 """Test `zot items count`."""
483483 result = runner .invoke (zot , ['items' , 'count' ])
484484 assert result .exit_code == 0
0 commit comments