Ejemplo n.º 1
0
 def setUp(self):
     _TestWithDb.setUp(self)
     config = Configurator(
         settings={
             'sqlalchemy.url': 'sqlite://',
             'mako.directories': ['clld:web/templates']
         })
     config.include('clld.web.app')
     config.include('clld_glottologfamily_plugin')
     config.register_datatable('languages', LanguagesWithFamily)
     self.app = ExtendedTestApp(config.make_wsgi_app())
 def setUp(self):
     _TestWithDb.setUp(self)
     config = Configurator(settings={
         'sqlalchemy.url': 'sqlite://',
         'mako.directories': ['clld:web/templates']})
     config.include('clld.web.app')
     config.include('clld_glottologfamily_plugin')
     config.register_datatable('languages', LanguagesWithFamily)
     self.app = ExtendedTestApp(config.make_wsgi_app())
class TestWithApp(_TestWithDb):
    def setUp(self):
        _TestWithDb.setUp(self)
        config = Configurator(settings={
            'sqlalchemy.url': 'sqlite://',
            'mako.directories': ['clld:web/templates']})
        config.include('clld.web.app')
        config.include('clld_glottologfamily_plugin')
        config.register_datatable('languages', LanguagesWithFamily)
        self.app = ExtendedTestApp(config.make_wsgi_app())

    def test_templates(self):
        self.app.get_html('/familys')
        self.app.get_dt('/familys')
        self.app.get_html('/familys/f')
        self.app.get_json('/familys/f.json')
        self.app.get_xml('/familys/f.rdf')

    def test_datatables(self):
        self.app.get_html('/languages')
        self.app.get_dt('/languages')
        self.app.get_dt('/languages?sSearch_0=m&sSearch_1=n&iSortingCols=1&iSortCol_0=0')
Ejemplo n.º 4
0
class TestWithApp(_TestWithDb):
    def setUp(self):
        _TestWithDb.setUp(self)
        config = Configurator(
            settings={
                'sqlalchemy.url': 'sqlite://',
                'mako.directories': ['clld:web/templates']
            })
        config.include('clld.web.app')
        config.include('clld_glottologfamily_plugin')
        config.register_datatable('languages', LanguagesWithFamily)
        self.app = ExtendedTestApp(config.make_wsgi_app())

    def test_templates(self):
        self.app.get_html('/familys')
        self.app.get_dt('/familys')
        self.app.get_html('/familys/f')
        self.app.get_json('/familys/f.json')
        self.app.get_xml('/familys/f.rdf')

    def test_datatables(self):
        self.app.get_html('/languages')
        self.app.get_dt('/languages')
        self.app.get_dt(
            '/languages?sSearch_0=m&sSearch_1=n&iSortingCols=1&iSortCol_0=0')