aboutsummaryrefslogtreecommitdiffstats
path: root/tests/primitives/test_utils.py
blob: 4666ece7da2fee23e0e9c25ff736845be29d60c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest

from .utils import encrypt_test


class TestEncryptTest(object):
    def test_skips_if_only_if_returns_false(self):
        with pytest.raises(pytest.skip.Exception) as exc_info:
            encrypt_test(
                None, None, None, None,
                only_if=lambda api: False,
                skip_message="message!"
            )
        assert exc_info.value.args[0] == "message!"