Skip to content

Commit ee6174b

Browse files
author
Bilal Al
committed
changed INLIST_SEMVER to IN_LIST_SEMVER
1 parent 8ef4761 commit ee6174b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

splitio/models/grammar/matchers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
MATCHER_GREATER_THAN_OR_EQUAL_TO_SEMVER = 'GREATER_THAN_OR_EQUAL_TO_SEMVER'
3434
MATCHER_LESS_THAN_OR_EQUAL_TO_SEMVER = 'LESS_THAN_OR_EQUAL_TO_SEMVER'
3535
MATCHER_BETWEEN_SEMVER = 'BETWEEN_SEMVER'
36-
MATCHER_INLIST_SEMVER = 'INLIST_SEMVER'
36+
MATCHER_INLIST_SEMVER = 'IN_LIST_SEMVER'
3737

3838

3939
_MATCHER_BUILDERS = {

splitio/models/grammar/matchers/semver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def _match(self, key, attributes=None, context=None):
355355
:rtype: bool
356356
"""
357357
if self._data is None:
358-
_LOGGER.error("whitelistMatcherData is required for INLIST_SEMVER matcher type")
358+
_LOGGER.error("whitelistMatcherData is required for IN_LIST_SEMVER matcher type")
359359
return None
360360

361361
matching_data = Sanitizer.ensure_string(self._get_matcher_input(key, attributes))
@@ -370,4 +370,4 @@ def __str__(self):
370370

371371
def _add_matcher_specific_properties_to_json(self):
372372
"""Add matcher specific properties to base dict before returning it."""
373-
return {'matcherType': 'INLIST_SEMVER', 'whitelistMatcherData': {'whitelist': self._data}}
373+
return {'matcherType': 'IN_LIST_SEMVER', 'whitelistMatcherData': {'whitelist': self._data}}

tests/models/grammar/test_matchers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ class InListSemverMatcherTests(MatcherTestsBase):
10561056

10571057
raw = {
10581058
'negate': False,
1059-
'matcherType': 'INLIST_SEMVER',
1059+
'matcherType': 'IN_LIST_SEMVER',
10601060
'whitelistMatcherData': {"whitelist": ["2.1.8", "2.1.11"]}
10611061
}
10621062

@@ -1088,7 +1088,7 @@ def test_matcher_behaviour(self, mocker):
10881088
def test_to_json(self):
10891089
"""Test that the object serializes to JSON properly."""
10901090
as_json = matchers.InListSemverMatcher(self.raw).to_json()
1091-
assert as_json['matcherType'] == 'INLIST_SEMVER'
1091+
assert as_json['matcherType'] == 'IN_LIST_SEMVER'
10921092
assert as_json['whitelistMatcherData'] == {"whitelist": ["2.1.8", "2.1.11"]}
10931093

10941094
def test_to_str(self):

0 commit comments

Comments
 (0)