示例#1
0
文件: form_test.py 项目: hypothesis/h
    def test_loader_has_correct_paths(self):
        base = mock.Mock(spec_set=["overlay"])

        form.create_environment(base)
        _, kwargs = base.overlay.call_args
        loader = kwargs["loader"]

        assert "templates/deform" in loader.searchpath[0]
示例#2
0
文件: form_test.py 项目: gnott/h
    def test_loader_has_correct_paths(self):
        base = mock.Mock(spec_set=['overlay'])

        form.create_environment(base)
        _, kwargs = base.overlay.call_args
        loader = kwargs['loader']

        assert 'templates/deform' in loader.searchpath[0]
        assert 'bootstrap_templates' in loader.searchpath[1]
示例#3
0
文件: form_test.py 项目: hypothesis/h
    def test_overlays_base_with_correct_args(self):
        base = mock.Mock(spec_set=["overlay"])

        form.create_environment(base)

        base.overlay.assert_called_once_with(autoescape=True, loader=mock.ANY)