Skip to content

[FSSDK-11184] Update: Send CMAB uuid in impression events #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

FarhanAnjum-opti
Copy link
Contributor

Summary

Impression event updates related to CMAB.

Test plan

Added unit tests

Issues

FSSDK-11184

- test_optimizely.py fixed to expect new Decision objects
…essages and add a test for handling 500 errors
…lt and updating get_variation return type to include detailed error information
-test cases changed to handle return type dicts of DecisionResult and VariationResult
…or-cmab' into farhan-anjum/FSSDK-11184-update-impression-event-for-cmab
…or-cmab' into farhan-anjum/FSSDK-11184-update-impression-event-for-cmab
…just related logic for improved variation handling"

This reverts commit b901c5f.
@FarhanAnjum-opti FarhanAnjum-opti force-pushed the farhan-anjum/FSSDK-11184-update-impression-event-for-cmab branch from 891aae9 to 73a2802 Compare June 30, 2025 20:09
variation = self.optimizely.get_variation('test_experiment', 'test_user')
self.assertEqual('variation', variation)

# Verify decision notification is sent with correct parameters

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to also assert that the sent logx event contains the uuid in metadata.

opt_obj.decision_service, 'get_variations_for_feature_list',
return_value=[decision_result]
), mock.patch(
'optimizely.event.user_event_factory.UserEventFactory.create_impression_event'
Copy link

@raju-opti raju-opti Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of mocking this, we can use a custom event dispatcher and assert on the eventDispatcher.dispatch method arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants