Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/q/u/qualitio-HEAD/qualitio/report/views.py   qualitio(Download)
from qualitio.report.models import ReportDirectory, Report
from qualitio.report.forms import ReportDirectoryForm, ReportForm, ContextElementFormset
from qualitio.report.validators import ReportValidator
 
 
 
    if report_form.is_valid() and report_contextelement_formset.is_valid():
        validator = ReportValidator(report_form.cleaned_data['template'],
                                    report_contextelement_formset.context_queries())
        if validator.is_valid():

src/q/u/qualitio-HEAD/qualitio/report/tests.py   qualitio(Download)
from qualitio import store
from qualitio.report.models import ReportDirectory, Report, ContextElement
from qualitio.report.validators import build_query, ReportValidator
 
 
    def test_able_to_validate_query_strings(self):
        validator = ReportValidator("{% for e in elements %}<p>{{ e.name }}</p>{% endfor %}", {
                "elements": "TestCase.all()",
                })
        self.assertTrue(validator.is_valid())
 
    def test_able_to_validate_queryset(self):
        validator = ReportValidator("{% for e in elements %}<p>{{ e.name }}</p>{% endfor %}", {