Skip to content

Updated tests - #562

Merged
chillaq merged 2 commits into
feature/rule-based-segmentfrom
rbs_factory
Mar 19, 2025
Merged

Updated tests#562
chillaq merged 2 commits into
feature/rule-based-segmentfrom
rbs_factory

Conversation

@chillaq

Copy link
Copy Markdown
Contributor

Python SDK

What did you accomplish?

How do we test the changes introduced in this PR?

Extra Notes

@chillaq
chillaq requested a review from a team as a code ownerMarch 19, 2025 02:26
Comment threadtests/integration/__init__.py Outdated
Comment on lines +3 to +5
rbsegments_json = [{
"segment1": {"changeNumber": 12, "name": "some_segment", "status": "ACTIVE","trafficTypeName": "user","excluded":{"keys":[],"segments":[]},"conditions": []}
}]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unless I'm misunderstanding this, the format is wrong.

Suggested change
rbsegments_json= [{
"segment1": {"changeNumber": 12, "name": "some_segment", "status": "ACTIVE","trafficTypeName": "user","excluded":{"keys":[],"segments":[]},"conditions": []}
}]
rbsegments_json= [{"changeNumber": 12, "name": "some_segment", "status": "ACTIVE","trafficTypeName": "user","excluded":{"keys":[],"segments":[]},"conditions": []}]

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

will fix

Comment threadtests/integration/test_client_e2e.py Outdated
assert sorted(self.factory.manager().split_names()) == ["SPLIT_1", "SPLIT_2", "SPLIT_3"]
assert client.get_treatment("key", "SPLIT_1", None) == 'off'
assert client.get_treatment("key", "SPLIT_2", None) == 'off'
assert client.get_treatment("key", "SPLIT_2", None) == 'on' #??

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we sure it's OK for this treatment to have changed?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

will fix

@chillaq
chillaq requested a review from gtheaMarch 19, 2025 16:42
@chillaq
chillaq merged commit db38e3e into feature/rule-based-segmentMar 19, 2025
@chillaq
chillaq deleted the rbs_factory branch March 19, 2025 18:19
Sign up for freeto 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

@chillaq@gthea