web/test/test_jscript.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 21 Jun 2013 12:08:06 +0200
changeset 9059 795ea498225f
parent 8879 982a49239420
child 10583 97c88aa7c779
permissions -rw-r--r--
[cwuser] make CWUser callable, returning self for dbapi compatibility In the dbapi, Connection and Session have a ``user`` method to generated a user for a request In the repo api, Connection and Session have a user attribute inherited from SessionRequestBase prototype. This ugly hack allows to not break user of the user method. To ease transition from dbapi to repoapi we need the ClientConnection to be as compatible as possible with the dbapi. Adding this method goes in this direction. It'll get deprecated in the deprecation wave that will conclude the repoapi refactoring. related to #2503918
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
from cubicweb.devtools.qunit import QUnitTestCase, unittest_main
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
from os import path as osp
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     4
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
class JScript(QUnitTestCase):
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
    all_js_tests = (
5766
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
     9
        ("jstests/test_utils.js", (
7363
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    10
            "../../web/data/cubicweb.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    11
            "../../web/data/cubicweb.compat.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    12
            "../../web/data/cubicweb.python.js",
5766
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    13
            "jstests/utils.js",
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    14
            ),
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    15
         ),
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    16
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
        ("jstests/test_htmlhelpers.js", (
7363
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    18
            "../../web/data/cubicweb.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    19
            "../../web/data/cubicweb.compat.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    20
            "../../web/data/cubicweb.python.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    21
            "../../web/data/cubicweb.htmlhelpers.js",
5766
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    22
            ),
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    23
         ),
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    24
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    25
        ("jstests/test_ajax.js", (
7363
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    26
            "../../web/data/cubicweb.python.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    27
            "../../web/data/cubicweb.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    28
            "../../web/data/cubicweb.compat.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    29
            "../../web/data/cubicweb.htmlhelpers.js",
2293c49b290a don't let windmill/qunit test break apycot warning for all web/test
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5766
diff changeset
    30
            "../../web/data/cubicweb.ajax.js",
5766
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    31
            ), (
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    32
            "jstests/ajax_url0.html",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    33
            "jstests/ajax_url1.html",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    34
            "jstests/ajax_url2.html",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    35
            "jstests/ajaxresult.json",
5766
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    36
            ),
c397819f2482 [js tests] fix javascripts tests definition, test_datetime.js now included in test_utils.js, which test other stuff as well
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 5743
diff changeset
    37
         ),
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
    )
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    39
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    40
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    41
if __name__ == '__main__':
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    42
    unittest_main()