author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 16 Sep 2009 17:32:39 +0200 | |
branch | 3.5 |
changeset 3265 | 96c8363b8f64 |
parent 1977 | 606923dff11b |
child 4212 | ab6573088b4a |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
7 |
""" |
0 | 8 |
from cubicweb.devtools import buildconfig, loadconfig |
9 |
from cubicweb.devtools.testlib import RealDBTest |
|
10 |
||
11 |
def setup_module(options): |
|
12 |
if options.source: |
|
13 |
configcls = loadconfig(options.source) |
|
14 |
elif options.dbname is None: |
|
15 |
raise Exception('either <sourcefile> or <dbname> options are required') |
|
16 |
else: |
|
17 |
configcls = buildconfig(options.dbuser, options.dbpassword, |
|
18 |
options.dbname, options.euser, |
|
19 |
options.epassword) |
|
20 |
RealDatabaseTC.configcls = configcls |
|
21 |
||
22 |
class RealDatabaseTC(RealDBTest): |
|
23 |
configcls = None # set by setup_module() |
|
24 |
||
25 |
def test_all_primaries(self): |
|
26 |
for rset in self.iter_individual_rsets(limit=50): |
|
27 |
yield self.view, 'primary', rset, rset.req.reset_headers() |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
28 |
|
0 | 29 |
## startup views |
30 |
def test_startup_views(self): |
|
31 |
for vid in self.list_startup_views(): |
|
32 |
req = self.request() |
|
33 |
yield self.view, vid, None, req |
|
34 |
||
35 |
||
36 |
if __name__ == '__main__': |
|
37 |
from logilab.common.testlib import unittest_main |
|
38 |
unittest_main() |