Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_calls__evaluate_env_var(self, mock__evaluate_env_var):
StringEvaluator.evaluate("boo", {})
mock__evaluate_env_var.assert_called_once_with("boo")
def test_calls_code_evaluate(self, mock_code_evaluate):
StringEvaluator.evaluate("boo", {})
mock_code_evaluate.assert_called_once_with("boo", {}, False)
def test_should_replace(self, sequence, variable, variable_value, expected):
assert (
StringEvaluator.replace_var_with_value(
sequence, variable, variable_value
)
== expected
)
def test_should_return_sequence(self, sequence):
assert StringEvaluator._evaluate_custom_var(sequence, {}) == sequence
def test_should_return_evaluated_var(self, sequence, expected):
assert StringEvaluator._evaluate_env_var(sequence) == expected