web/test/test_jscript.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 25 Oct 2010 10:18:10 +0200
changeset 6614 4b9a785df0f7
parent 5766 c397819f2482
permissions -rw-r--r--
[web] proper error when no json module available
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", (
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
            "../data/cubicweb.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
    11
            "../data/cubicweb.compat.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
    12
            "../data/cubicweb.python.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
    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", (
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
            "../data/cubicweb.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
            "../data/cubicweb.compat.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
            "../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
    21
            "../data/cubicweb.htmlhelpers.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
    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", (
5743
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
            "../data/cubicweb.python.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
            "../data/cubicweb.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
            "../data/cubicweb.compat.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    29
            "../data/cubicweb.htmlhelpers.js",
4a0600664f85 Use the qunit automatic launcher for existing testcase.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    30
            "../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()