コード例 #1
0
ファイル: test_utilities.py プロジェクト: swisszhang/tavern
    def test_get_nonexistent_function(self):
        """No name in module"""

        spec = {"function": "os:aaueurhg"}

        with pytest.raises(exceptions.BadSchemaError):
            validate_extensions(spec, None, None)
コード例 #2
0
ファイル: test_utilities.py プロジェクト: swisszhang/tavern
    def test_get_invalid_module(self):
        """Nonexistent module"""

        spec = {"function": "bleuuerhug:add"}

        with pytest.raises(exceptions.BadSchemaError):
            validate_extensions(spec, None, None)
コード例 #3
0
ファイル: test_utilities.py プロジェクト: swisszhang/tavern
    def test_get_extension_list_empty(self):
        """Loads a validation function correctly

        This doesn't check the signature at the time of writing
        """

        spec = []

        validate_extensions(spec, None, None)
コード例 #4
0
ファイル: test_utilities.py プロジェクト: swisszhang/tavern
    def test_get_extension_list(self):
        """Loads a validation function correctly

        This doesn't check the signature at the time of writing
        """

        spec = [{"function": "operator:add"}]

        validate_extensions(spec, None, None)