File: test_lua_schema.py

package info (click to toggle)
knot-resolver 6.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,376 kB
  • sloc: javascript: 42,732; ansic: 40,311; python: 12,580; cpp: 2,121; sh: 1,988; xml: 193; makefile: 181
file content (9 lines) | stat: -rw-r--r-- 294 bytes parent folder | download
1
2
3
4
5
6
7
8
9
from pytest import raises

from knot_resolver.datamodel.lua_schema import LuaSchema
from knot_resolver.utils.modeling.exceptions import DataValidationError


def test_invalid():
    with raises(DataValidationError):
        LuaSchema({"script": "-- lua script", "script-file": "path/to/file"})