File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
tests/unitary/default_setup/catalog Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ def setUpClass(cls) -> None:
7575 "NB_SESSION_COMPARTMENT_OCID"
7676 ] = "ocid1.compartment.oc1.<unique_ocid>"
7777 reload (ads .config )
78- reload (ads .catalog .notebook )
78+ ads .catalog .notebook .NB_SESSION_COMPARTMENT_OCID = (
79+ ads .config .NB_SESSION_COMPARTMENT_OCID
80+ )
7981 # Initialize class properties after reloading
8082 with patch .object (auth , "default_signer" ):
8183 with patch .object (oci_client , "OCIClientFactory" ):
@@ -99,7 +101,9 @@ def setUpClass(cls) -> None:
99101 def tearDownClass (cls ) -> None :
100102 os .environ .pop ("NB_SESSION_COMPARTMENT_OCID" , None )
101103 reload (ads .config )
102- reload (ads .catalog .notebook )
104+ ads .catalog .notebook .NB_SESSION_COMPARTMENT_OCID = (
105+ ads .config .NB_SESSION_COMPARTMENT_OCID
106+ )
103107 return super ().tearDownClass ()
104108
105109 @staticmethod
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def setUpClass(cls) -> None:
6868 "NB_SESSION_COMPARTMENT_OCID"
6969 ] = "ocid1.compartment.oc1.<unique_ocid>"
7070 reload (ads .config )
71- reload ( ads .catalog .project )
71+ ads .catalog .project . NB_SESSION_COMPARTMENT_OCID = ads . config . NB_SESSION_COMPARTMENT_OCID
7272 # Initialize class properties after reloading
7373 with patch .object (auth , "default_signer" ):
7474 with patch .object (oci_client , "OCIClientFactory" ):
@@ -92,7 +92,7 @@ def setUpClass(cls) -> None:
9292 def tearDownClass (cls ) -> None :
9393 os .environ .pop ("NB_SESSION_COMPARTMENT_OCID" , None )
9494 reload (ads .config )
95- reload ( ads .catalog .project )
95+ ads .catalog .project . NB_SESSION_COMPARTMENT_OCID = ads . config . NB_SESSION_COMPARTMENT_OCID
9696 return super ().tearDownClass ()
9797
9898 @staticmethod
You can’t perform that action at this time.
0 commit comments