Skip to content

Commit a164906

Browse files
authored
Merge pull request #104 from launchdarkly/eb/fix-tests
miscellaneous test fixes
2 parents 4ca26c7 + 7585684 commit a164906

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

ldclient/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _make_event_processor(self, config):
124124
def _make_update_processor(self, config, store, ready):
125125
if config.update_processor_class:
126126
log.info("Using user-specified update processor: " + str(config.update_processor_class))
127-
return self._config.update_processor_class(config, store, ready)
127+
return config.update_processor_class(config, store, ready)
128128

129129
if config.offline or config.use_ldd:
130130
return NullUpdateProcessor(config, store, ready)

testing/test_ldclient.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,14 @@ def test_client_has_null_update_processor_in_ldd_mode():
111111
assert isinstance(client._update_processor, NullUpdateProcessor)
112112

113113

114+
@pytest.mark.skip("Can't currently use a live stream processor in tests because its error logging will disrupt other tests.")
114115
def test_client_has_streaming_processor_by_default():
115116
config = Config(sdk_key="secret", base_uri=unreachable_uri, stream_uri=unreachable_uri, send_events=False)
116117
with LDClient(config=config, start_wait=0) as client:
117118
assert isinstance(client._update_processor, StreamingUpdateProcessor)
118119

119120

121+
@pytest.mark.skip("Can't currently use a live polling processor in tests because its error logging will disrupt other tests.")
120122
def test_client_has_polling_processor_if_streaming_is_disabled():
121123
config = Config(sdk_key="secret", stream=False, base_uri=unreachable_uri, stream_uri=unreachable_uri, send_events=False)
122124
with LDClient(config=config, start_wait=0) as client:

testing/test_ldclient_evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_variation_detail_when_user_is_none():
123123
expected = EvaluationDetail('default', None, {'kind': 'ERROR', 'errorKind': 'USER_NOT_SPECIFIED'})
124124
assert expected == client.variation_detail('feature.key', None, default='default')
125125

126-
def test_variation_when_user_has_no_key():
126+
def test_variation_detail_when_user_has_no_key():
127127
feature = make_off_flag_with_value('feature.key', 'value')
128128
store = InMemoryFeatureStore()
129129
store.init({FEATURES: {'feature.key': feature}})

0 commit comments

Comments
 (0)