web/test/test_jscript.py
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 24 Jun 2013 19:00:40 +0200
changeset 9147 01124cfd4b1f
parent 8879 982a49239420
child 10583 97c88aa7c779
permissions -rw-r--r--
[etwist] fix handling of multiple files per field html5 permits multiple files uploads, which can be expressed as:: <input type='file' multiple='multiple' /> This changeset avoids previous crash. Nothing is changed when a single file is uploaded (backward compat is thus preserved). When multiple files are uploaded for a single html input tag, the corresponding web request form key receives a list of tuples like [('filename-1', IStream1), ('filename-2', IStream2), ...]. closes #2847207.
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()