File tree Expand file tree Collapse file tree 2 files changed +1
-26
lines changed
tests/unit/integrations/flagsmith Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change 3131
3232def get_openfeature_client (
3333 domain : str = DEFAULT_OPENFEATURE_DOMAIN ,
34- ** flagsmith_kwargs : typing .Any ,
3534) -> OpenFeatureClient :
3635 openfeature_client = openfeature_api .get_client (domain = domain )
3736 if openfeature_client .get_provider_status () != ProviderStatus .READY :
38- initialise_provider (domain , ** ( flagsmith_kwargs or get_provider_kwargs () ))
37+ initialise_provider (domain , ** get_provider_kwargs ())
3938 return openfeature_client
4039
4140
Original file line number Diff line number Diff line change @@ -84,30 +84,6 @@ def test_get_openfeature_client__provider_ready__skips_initialisation(
8484 mock_openfeature_api .set_provider .assert_not_called ()
8585
8686
87- def test_get_openfeature_client__custom_flagsmith_kwargs__passes_to_provider (
88- settings : SettingsWrapper ,
89- mocker : MockerFixture ,
90- mock_local_file_handler : MagicMock ,
91- mock_local_file_handler_class : MagicMock ,
92- ) -> None :
93- # Given
94- settings .FLAGSMITH_ON_FLAGSMITH_SERVER_OFFLINE_MODE = True
95-
96- mock_openfeature_api = mocker .patch ("integrations.flagsmith.client.openfeature_api" )
97- mock_client = mock_openfeature_api .get_client .return_value
98- mock_client .get_provider_status .return_value = ProviderStatus .NOT_READY
99-
100- mock_flagsmith_class = mocker .patch ("integrations.flagsmith.client.Flagsmith" )
101- mocker .patch ("integrations.flagsmith.client.FlagsmithProvider" )
102-
103- # When
104- get_openfeature_client (enable_local_evaluation = False )
105-
106- # Then
107- call_args = mock_flagsmith_class .call_args
108- assert call_args .kwargs ["enable_local_evaluation" ] is False
109-
110-
11187def test_initialise_provider__offline_mode_disabled__initialises_with_server_key (
11288 settings : SettingsWrapper ,
11389 mocker : MockerFixture ,
You can’t perform that action at this time.
0 commit comments