Skip to content

Commit 153e7fa

Browse files
committed
test: remove obsolete initialization mock
1 parent e69a17e commit 153e7fa

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎tests/test_provider.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
from featbit_openfeature import FeatBitProvider
2222

2323

24-
def make_client(initialized=True):
24+
def make_client():
2525
client = Mock()
26-
client.initialize = initialized
2726
client.flag_tracker = Mock()
2827
client.update_status_provider = Mock()
2928
client.update_status_provider.wait_for_OKState.return_value = True
@@ -145,7 +144,7 @@ def test_unexpected_evaluation_exception_never_escapes():
145144

146145

147146
def test_initialize_returns_immediately_when_client_is_ready():
148-
client = make_client(initialized=True)
147+
client = make_client()
149148
provider = FeatBitProvider(client)
150149

151150
provider.initialize(EvaluationContext())
@@ -155,7 +154,7 @@ def test_initialize_returns_immediately_when_client_is_ready():
155154

156155

157156
def test_initialize_waits_for_ready_client():
158-
client = make_client(initialized=False)
157+
client = make_client()
159158
client.update_status_provider.wait_for_OKState.return_value = True
160159
provider = FeatBitProvider(client, initialization_timeout=3)
161160

@@ -165,7 +164,7 @@ def test_initialize_waits_for_ready_client():
165164

166165

167166
def test_initialize_timeout_raises_provider_not_ready():
168-
client = make_client(initialized=False)
167+
client = make_client()
169168
client.update_status_provider.wait_for_OKState.return_value = False
170169
client.update_status_provider.current_state = State.intializing_state()
171170
provider = FeatBitProvider(client, initialization_timeout=3)
@@ -179,7 +178,7 @@ def test_initialize_timeout_raises_provider_not_ready():
179178

180179

181180
def test_initialize_off_state_raises_provider_fatal():
182-
client = make_client(initialized=False)
181+
client = make_client()
183182
client.update_status_provider.wait_for_OKState.return_value = False
184183
client.update_status_provider.current_state = State.error_off_state(
185184
"credential", "invalid environment secret"

0 commit comments

Comments
 (0)