vigiboard / vigiboard / tests / __init__.py @ c25a3200
History | View | Annotate | Download (755 Bytes)
1 |
# -*- coding: utf-8 -*-
|
---|---|
2 |
# Copyright (C) 2006-2020 CS GROUP – France
|
3 |
# License: GNU GPL v2 <http://www.gnu.org/licenses/gpl-2.0.html>
|
4 |
|
5 |
"""Unit and functional test suite for vigiboard."""
|
6 |
|
7 |
from vigilo.turbogears.test import setup_db, teardown_db |
8 |
from vigilo.turbogears.test import TestController as TestTGController |
9 |
|
10 |
__all__ = ['setup_db', 'teardown_db', 'TestController'] |
11 |
|
12 |
class TestController(TestTGController): |
13 |
def get_rows(self, response): |
14 |
return response.lxml.xpath(
|
15 |
'//table[contains(concat(" ", @class, " "), " vigitable ")]'
|
16 |
'/tbody/tr')
|
17 |
|
18 |
def get_cells(self, response): |
19 |
return response.lxml.xpath(
|
20 |
'//table[contains(concat(" ", @class, " "), " vigitable ")]'
|
21 |
'/tbody/tr/td')
|