Exemplo n.º 1
0
    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]
Exemplo n.º 2
0
Arquivo: form_test.py Projeto: 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]
Exemplo n.º 3
0
    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]
Exemplo n.º 4
0
    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)