equal
deleted
inserted
replaced
1 from os.path import dirname, join, abspath |
1 from os.path import dirname, join, abspath |
|
2 from datetime import datetime, timedelta |
|
3 |
2 from logilab.common.decorators import cached |
4 from logilab.common.decorators import cached |
3 from mx.DateTime import now |
|
4 |
5 |
5 from cubicweb.devtools import TestServerConfiguration, init_test_database |
6 from cubicweb.devtools import TestServerConfiguration, init_test_database |
6 from cubicweb.devtools.apptest import RepositoryBasedTC |
7 from cubicweb.devtools.apptest import RepositoryBasedTC |
7 from cubicweb.devtools.repotest import do_monkey_patch, undo_monkey_patch |
8 from cubicweb.devtools.repotest import do_monkey_patch, undo_monkey_patch |
8 |
9 |
21 ec1 = cu.execute('INSERT Card X: X title "C3: An external card", X wikiid "aaa"')[0][0] |
22 ec1 = cu.execute('INSERT Card X: X title "C3: An external card", X wikiid "aaa"')[0][0] |
22 cu.execute('INSERT Card X: X title "C4: Ze external card", X wikiid "zzz"') |
23 cu.execute('INSERT Card X: X title "C4: Ze external card", X wikiid "zzz"') |
23 aff1 = cu.execute('INSERT Affaire X: X ref "AFFREF", X in_state S WHERE S name "pitetre"')[0][0] |
24 aff1 = cu.execute('INSERT Affaire X: X ref "AFFREF", X in_state S WHERE S name "pitetre"')[0][0] |
24 cnx2.commit() |
25 cnx2.commit() |
25 |
26 |
26 MTIME = now() - 0.1 |
27 MTIME = datetime.now() - timedelta(0, 10) |
27 |
28 |
28 repo3, cnx3 = init_test_database('sqlite', config=ExternalSource2Configuration('data')) |
29 repo3, cnx3 = init_test_database('sqlite', config=ExternalSource2Configuration('data')) |
29 |
30 |
30 # XXX, access existing connection, no pyro connection |
31 # XXX, access existing connection, no pyro connection |
31 from cubicweb.server.sources.pyrorql import PyroRQLSource |
32 from cubicweb.server.sources.pyrorql import PyroRQLSource |