Skip to content

Commit

Permalink
another discrepancy across python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
oakbani committed Feb 25, 2019
1 parent 76e5898 commit b24fb83
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/helpers_tests/test_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,8 @@ def test_exact__user_value__unexpected_type(self):

mock_log = getattr(self.mock_client_logger, log_level)
mock_log.assert_called_once_with((
'Audience condition "{}" evaluated to UNKNOWN because a value of type "<type \'dict\'>" was passed for '
'user attribute "favorite_constellation".').format(json.dumps(expected_condition_log)))
'Audience condition "{}" evaluated to UNKNOWN because a value of type "{}" was passed for '
'user attribute "favorite_constellation".').format(json.dumps(expected_condition_log), type({})))

def test_greater_than__user_value__unexpected_type(self):
log_level = 'warning'
Expand All @@ -1062,8 +1062,8 @@ def test_greater_than__user_value__unexpected_type(self):
mock_log = getattr(self.mock_client_logger, log_level)
mock_log.assert_called_once_with((
'Audience condition "{}"'
' evaluated to UNKNOWN because a value of type "<type \'str\'>" was passed for user attribute '
'"meters_travelled".').format(json.dumps(expected_condition_log)))
' evaluated to UNKNOWN because a value of type "{}" was passed for user attribute '
'"meters_travelled".').format(json.dumps(expected_condition_log), type('48')))

def test_less_than__user_value__unexpected_type(self):
log_level = 'warning'
Expand All @@ -1087,8 +1087,8 @@ def test_less_than__user_value__unexpected_type(self):
mock_log = getattr(self.mock_client_logger, log_level)
mock_log.assert_called_once_with((
'Audience condition "{}"'
' evaluated to UNKNOWN because a value of type "<type \'bool\'>" was passed for user attribute '
'"meters_travelled".').format(json.dumps(expected_condition_log)))
' evaluated to UNKNOWN because a value of type "{}" was passed for user attribute '
'"meters_travelled".').format(json.dumps(expected_condition_log), type(True)))

def test_substring__user_value__unexpected_type(self):
log_level = 'warning'
Expand All @@ -1111,8 +1111,8 @@ def test_substring__user_value__unexpected_type(self):

mock_log = getattr(self.mock_client_logger, log_level)
mock_log.assert_called_once_with((
'Audience condition "{}" evaluated to UNKNOWN because a value of type "<type \'int\'>" was passed for '
'user attribute "headline_text".').format(json.dumps(expected_condition_log)))
'Audience condition "{}" evaluated to UNKNOWN because a value of type "{}" was passed for '
'user attribute "headline_text".').format(json.dumps(expected_condition_log), type(1234)))

def test_exact__user_value__infinite(self):
log_level = 'warning'
Expand Down Expand Up @@ -1210,5 +1210,5 @@ def test_exact__user_value_type_mismatch(self):

mock_log = getattr(self.mock_client_logger, log_level)
mock_log.assert_called_once_with((
'Audience condition "{}" evaluated to UNKNOWN because a value of type "<type \'int\'>" was passed for '
'user attribute "favorite_constellation".').format(json.dumps(expected_condition_log)))
'Audience condition "{}" evaluated to UNKNOWN because a value of type "{}" was passed for '
'user attribute "favorite_constellation".').format(json.dumps(expected_condition_log), type(5)))

0 comments on commit b24fb83

Please sign in to comment.