How to use the scanapi.evaluators.StringEvaluator function in scanapi

To help you get started, we’ve selected a few scanapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github camilamaia / scanapi / tests / unit / evaluators / test_string_evaluator.py View on Github external
def test_calls__evaluate_env_var(self, mock__evaluate_env_var):
            StringEvaluator.evaluate("boo", {})
            mock__evaluate_env_var.assert_called_once_with("boo")
github camilamaia / scanapi / tests / unit / evaluators / test_string_evaluator.py View on Github external
def test_calls_code_evaluate(self, mock_code_evaluate):
            StringEvaluator.evaluate("boo", {})
            mock_code_evaluate.assert_called_once_with("boo", {}, False)
github camilamaia / scanapi / tests / unit / evaluators / test_string_evaluator.py View on Github external
def test_should_replace(self, sequence, variable, variable_value, expected):
            assert (
                StringEvaluator.replace_var_with_value(
                    sequence, variable, variable_value
                )
                == expected
            )
github camilamaia / scanapi / tests / unit / evaluators / test_string_evaluator.py View on Github external
def test_should_return_sequence(self, sequence):
                assert StringEvaluator._evaluate_custom_var(sequence, {}) == sequence
github camilamaia / scanapi / tests / unit / evaluators / test_string_evaluator.py View on Github external
def test_should_return_evaluated_var(self, sequence, expected):
                    assert StringEvaluator._evaluate_env_var(sequence) == expected