@@ -149,7 +149,7 @@ def test_sync_client_uses_current_scope_token(self):
149149 mock_scope .context = {"REPLICATE_API_TOKEN" : "cog-token" }
150150 mock_cog = mock .MagicMock ()
151151 mock_cog .current_scope .return_value = mock_scope
152-
152+
153153 # Clear environment variable to ensure we're using cog
154154 with mock .patch .dict (os .environ , {}, clear = True ):
155155 with mock .patch .dict (sys .modules , {"cog" : mock_cog }):
@@ -162,7 +162,7 @@ def test_async_client_uses_current_scope_token(self):
162162 mock_scope .context = {"REPLICATE_API_TOKEN" : "cog-token" }
163163 mock_cog = mock .MagicMock ()
164164 mock_cog .current_scope .return_value = mock_scope
165-
165+
166166 # Clear environment variable to ensure we're using cog
167167 with mock .patch .dict (os .environ , {}, clear = True ):
168168 with mock .patch .dict (sys .modules , {"cog" : mock_cog }):
@@ -203,7 +203,7 @@ def test_explicit_token_overrides_current_scope(self):
203203 mock_scope .context = {"REPLICATE_API_TOKEN" : "cog-token" }
204204 mock_cog = mock .MagicMock ()
205205 mock_cog .current_scope .return_value = mock_scope
206-
206+
207207 with mock .patch .dict (sys .modules , {"cog" : mock_cog }):
208208 client = Replicate (bearer_token = "explicit-token" , base_url = "http://test.example.com" )
209209 assert client .bearer_token == "explicit-token"
@@ -214,7 +214,7 @@ def test_explicit_async_token_overrides_current_scope(self):
214214 mock_scope .context = {"REPLICATE_API_TOKEN" : "cog-token" }
215215 mock_cog = mock .MagicMock ()
216216 mock_cog .current_scope .return_value = mock_scope
217-
217+
218218 with mock .patch .dict (sys .modules , {"cog" : mock_cog }):
219219 client = AsyncReplicate (bearer_token = "explicit-token" , base_url = "http://test.example.com" )
220- assert client .bearer_token == "explicit-token"
220+ assert client .bearer_token == "explicit-token"
0 commit comments