File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed 
infrahub_sdk/pytest_plugin Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,11 @@ def pytest_sessionstart(session: Session) -> None:
7676        "default_branch" : session .config .option .infrahub_branch ,
7777    }
7878    if  hasattr (session .config .option , "infrahub_key" ):
79-         client_config   =  { "api_token" :  session .config .option .infrahub_key } 
79+         client_config [ "api_token" ]  =   session .config .option .infrahub_key 
8080    elif  hasattr (session .config .option , "infrahub_username" ) and  hasattr (session .config .option , "infrahub_password" ):
81-         client_config  =  {
82-             "username" : session .config .option .infrahub_username ,
83-             "password" : session .config .option .infrahub_password ,
84-         }
81+         client_config .pop ("api_token" )
82+         client_config ["username" ] =  session .config .option .infrahub_username 
83+         client_config ["password" ] =  session .config .option .infrahub_password 
8584
8685    infrahub_client  =  InfrahubClientSync (config = client_config )
8786    session .infrahub_client  =  infrahub_client   # type: ignore[attr-defined] 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments