def test_Contributors(request_factory): from clld.web.datatables.contributor import Contributors with request_factory(params={ 'iSortingCols': '1', 'iSortCol_0': '0', 'sSortDir_0': 'desc' }) as req: handle_dt(req, Contributors, common.Contributor)
def test_Contributors(request_factory): from clld.web.datatables.contributor import Contributors with request_factory(params={ 'iSortingCols': '1', 'iSortCol_0': '0', 'sSortDir_0': 'desc'} ) as req: handle_dt(req, Contributors, common.Contributor)
def test_DataTable3(env, request_factory): class TestTable(DataTable): def col_defs(self): return [PercentCol(self, 'frequency'), Col(self, 'name', choices=['a'])] handle_dt(env['request'], TestTable, common.Value) with request_factory(params={'sSearch_0': '> 10', 'sSearch_1': 'a'}) as req: handle_dt(req, TestTable, common.Value)
def test_DataTable2(request_factory): class TestCol(Col): def search(self, qs): return filter_number(cast(self.dt.model.pk, Integer), qs, type_=int) class TestTable(DataTable): def col_defs(self): return [Col(self, 'latitude'), TestCol(self, 'pk')] with request_factory(params={'sSearch_0': '> 1', 'sSearch_1': '> 1'}) as req: handle_dt(req, TestTable, common.Language)
def test_DataTable3(env, request_factory): class TestTable(DataTable): def col_defs(self): return [ PercentCol(self, 'frequency'), Col(self, 'name', choices=['a']) ] handle_dt(env['request'], TestTable, common.Value) with request_factory(params={ 'sSearch_0': '> 10', 'sSearch_1': 'a' }) as req: handle_dt(req, TestTable, common.Value)
def test_DataTable2(request_factory): class TestCol(Col): def search(self, qs): return filter_number(cast(self.dt.model.pk, Integer), qs, type_=int) class TestTable(DataTable): def col_defs(self): return [Col(self, 'latitude'), TestCol(self, 'pk')] with request_factory(params={ 'sSearch_0': '> 1', 'sSearch_1': '> 1' }) as req: handle_dt(req, TestTable, common.Language)
def test_Contributions(env): from clld.web.datatables.contribution import Contributions handle_dt(env['request'], Contributions, common.Contribution)
def test_table(env): handle_dt(env['request'], Unitparameters, common.UnitParameter)
def test_Values(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Values, common.Value)
def test_Units(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Units, common.Unit)
def test_Languages(env): from clld.web.datatables.language import Languages handle_dt(env['request'], Languages, common.Language)
def test_Parameters(env): from clld.web.datatables.parameter import Parameters handle_dt(env['request'], Parameters, common.Parameter)
def test_Sources(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Sources, common.Source)
def test_plain(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Sentences, common.Sentence)
def test_Unitvalues(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Unitvalues, common.UnitValue)
def test_DataTable_cols(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Table, common.Contributor)
def test_Values(request_factory, params): with request_factory(params=params) as req: handle_dt(req, Valuesets, common.ValueSet)