0001-misc-pylint-on-tests-52630.patch
pylint.rc | ||
---|---|---|
6 | 6 |
init-hook="import sys, os; sys.path.append("wcs")' |
7 | 7 | |
8 | 8 |
[MESSAGES CONTROL] |
9 |
disable=abstract-method,arguments-differ,assignment-from-no-return,assignment-from-none,attribute-defined-outside-init,broad-except,consider-using-dict-comprehension,consider-using-set-comprehension,consider-using-ternary,cyclic-import,deprecated-module,duplicate-code,duplicate-except,eval-used,exec-used,fixme,global-variable-undefined,import-outside-toplevel,inconsistent-return-statements,invalid-name,keyword-arg-before-vararg,len-as-condition,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-return,no-member,no-self-use,non-parent-init-called,not-a-mapping,not-callable,possibly-unused-variable,protected-access,raise-missing-from,redefined-argument-from-local,redefined-builtin,redefined-outer-name,signature-differs,stop-iteration-return,subprocess-run-check,super-init-not-called,superfluous-parens,too-many-ancestors,too-many-arguments,too-many-boolean-expressions,too-many-branches,too-many-function-args,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-nested-blocks,too-many-public-methods,too-many-return-statements,too-many-statements,undefined-loop-variable,unnecessary-comprehension,unnecessary-lambda,unsubscriptable-object,unsupported-membership-test,unused-argument |
|
9 |
disable= |
|
10 |
abstract-method, |
|
11 |
arguments-differ, |
|
12 |
assignment-from-no-return, |
|
13 |
assignment-from-none, |
|
14 |
attribute-defined-outside-init, |
|
15 |
broad-except, |
|
16 |
consider-using-dict-comprehension, |
|
17 |
consider-using-set-comprehension, |
|
18 |
consider-using-ternary, |
|
19 |
cyclic-import, |
|
20 |
deprecated-module, |
|
21 |
disallowed-name, |
|
22 |
duplicate-code, |
|
23 |
duplicate-except, |
|
24 |
eval-used, |
|
25 |
exec-used, |
|
26 |
fixme, |
|
27 |
global-variable-undefined, |
|
28 |
import-outside-toplevel, |
|
29 |
inconsistent-return-statements, |
|
30 |
invalid-name, |
|
31 |
keyword-arg-before-vararg, |
|
32 |
len-as-condition, |
|
33 |
missing-class-docstring, |
|
34 |
missing-function-docstring, |
|
35 |
missing-module-docstring, |
|
36 |
no-else-return, |
|
37 |
no-member, |
|
38 |
no-self-use, |
|
39 |
non-parent-init-called, |
|
40 |
not-a-mapping, |
|
41 |
not-callable, |
|
42 |
pointless-statement, |
|
43 |
possibly-unused-variable, |
|
44 |
protected-access, |
|
45 |
raise-missing-from, |
|
46 |
redefined-argument-from-local, |
|
47 |
redefined-builtin, |
|
48 |
redefined-outer-name, |
|
49 |
signature-differs, |
|
50 |
stop-iteration-return, |
|
51 |
subprocess-run-check, |
|
52 |
super-init-not-called, |
|
53 |
superfluous-parens, |
|
54 |
too-many-ancestors, |
|
55 |
too-many-arguments, |
|
56 |
too-many-boolean-expressions, |
|
57 |
too-many-branches, |
|
58 |
too-many-function-args, |
|
59 |
too-many-instance-attributes, |
|
60 |
too-many-lines, |
|
61 |
too-many-locals, |
|
62 |
too-many-nested-blocks, |
|
63 |
too-many-public-methods, |
|
64 |
too-many-return-statements, |
|
65 |
too-many-statements, |
|
66 |
undefined-loop-variable, |
|
67 |
unnecessary-comprehension, |
|
68 |
unnecessary-lambda, |
|
69 |
unsubscriptable-object, |
|
70 |
unsupported-membership-test, |
|
71 |
unused-argument |
|
10 | 72 | |
11 | 73 | |
12 | 74 |
[REPORTS] |
tests/admin_pages/test_all.py | ||
---|---|---|
3 | 3 |
import os |
4 | 4 | |
5 | 5 |
import pytest |
6 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
7 | 6 | |
8 | 7 |
from wcs.qommon.http_request import HTTPRequest |
9 | 8 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
10 | 9 | |
10 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
11 | ||
11 | 12 | |
12 | 13 |
def pytest_generate_tests(metafunc): |
13 | 14 |
if 'pub' in metafunc.fixturenames: |
tests/admin_pages/test_api_access.py | ||
---|---|---|
15 | 15 |
# along with this program; if not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
import pytest |
18 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
19 | 18 | |
20 | 19 |
from wcs.api_access import ApiAccess |
21 | 20 |
from wcs.qommon.http_request import HTTPRequest |
22 | 21 | |
22 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
23 | 23 |
from .test_all import create_superuser |
24 | 24 | |
25 | 25 |
tests/admin_pages/test_block.py | ||
---|---|---|
8 | 8 |
lasso = None |
9 | 9 | |
10 | 10 |
import pytest |
11 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
12 | 11 |
from webtest import Upload |
13 | 12 | |
14 | 13 |
from wcs import fields |
... | ... | |
16 | 15 |
from wcs.formdef import FormDef |
17 | 16 |
from wcs.qommon.http_request import HTTPRequest |
18 | 17 | |
18 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
19 | 19 |
from .test_all import create_role, create_superuser |
20 | 20 | |
21 | 21 |
tests/admin_pages/test_card.py | ||
---|---|---|
3 | 3 |
import re |
4 | 4 | |
5 | 5 |
import pytest |
6 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
7 | 6 | |
8 | 7 |
from wcs import fields |
9 | 8 |
from wcs.admin.settings import UserFieldsFormDef |
... | ... | |
14 | 13 |
from wcs.wf.form import FormWorkflowStatusItem, WorkflowFormFieldsFormDef |
15 | 14 |
from wcs.workflows import Workflow, WorkflowBackofficeFieldsFormDef, WorkflowVariablesFieldsFormDef |
16 | 15 | |
16 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | 17 |
from .test_all import create_superuser |
18 | 18 | |
19 | 19 |
tests/admin_pages/test_carddefcategory.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
5 | 4 | |
6 | 5 |
from wcs.carddef import CardDef |
7 | 6 |
from wcs.categories import CardDefCategory |
8 | 7 |
from wcs.qommon.http_request import HTTPRequest |
9 | 8 | |
9 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
10 | 10 |
from .test_all import create_superuser |
11 | 11 | |
12 | 12 |
tests/admin_pages/test_category.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
5 | 4 | |
6 | 5 |
from wcs.categories import Category |
7 | 6 |
from wcs.formdef import FormDef |
8 | 7 |
from wcs.qommon.http_request import HTTPRequest |
9 | 8 | |
9 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
10 | 10 |
from .test_all import create_superuser |
11 | 11 | |
12 | 12 |
tests/admin_pages/test_datasource.py | ||
---|---|---|
13 | 13 |
lasso = None |
14 | 14 | |
15 | 15 |
import pytest |
16 |
from utilities import HttpRequestsMocking, clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | 16 |
from webtest import Upload |
18 | 17 | |
19 | 18 |
from wcs import fields |
... | ... | |
24 | 23 |
from wcs.qommon.http_request import HTTPRequest |
25 | 24 |
from wcs.workflows import Workflow, WorkflowBackofficeFieldsFormDef |
26 | 25 | |
26 |
from ..utilities import HttpRequestsMocking, clean_temporary_pub, create_temporary_pub, get_app, login |
|
27 | 27 |
from .test_all import create_superuser |
28 | 28 | |
29 | 29 |
tests/admin_pages/test_form.py | ||
---|---|---|
10 | 10 | |
11 | 11 |
import mock |
12 | 12 |
import pytest |
13 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
14 | 13 |
from webtest import Upload |
15 | 14 | |
16 | 15 |
from wcs import fields |
... | ... | |
23 | 22 |
from wcs.workflows import Workflow |
24 | 23 |
from wcs.wscalls import NamedWsCall |
25 | 24 | |
25 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
26 | 26 |
from .test_all import create_role, create_superuser |
27 | 27 | |
28 | 28 |
tests/admin_pages/test_logged_errors.py | ||
---|---|---|
3 | 3 |
import datetime |
4 | 4 | |
5 | 5 |
import pytest |
6 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
7 | 6 | |
8 | 7 |
from wcs.carddef import CardDef |
9 | 8 |
from wcs.formdef import FormDef |
10 | 9 |
from wcs.qommon.http_request import HTTPRequest |
11 | 10 |
from wcs.workflows import Workflow |
12 | 11 | |
12 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
13 | 13 |
from .test_all import create_superuser |
14 | 14 | |
15 | 15 |
tests/admin_pages/test_role.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
5 | 4 | |
6 | 5 |
from wcs.formdef import FormDef |
7 | 6 |
from wcs.qommon.http_request import HTTPRequest |
8 | 7 | |
8 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
9 | 9 |
from .test_all import create_superuser |
10 | 10 | |
11 | 11 |
tests/admin_pages/test_settings.py | ||
---|---|---|
14 | 14 |
import mock |
15 | 15 |
import pytest |
16 | 16 |
from quixote.http_request import Upload as QuixoteUpload |
17 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
18 | 17 |
from webtest import Upload |
19 | 18 | |
20 | 19 |
from wcs import fields |
... | ... | |
30 | 29 |
from wcs.workflows import CommentableWorkflowStatusItem, Workflow |
31 | 30 |
from wcs.wscalls import NamedWsCall |
32 | 31 | |
32 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
33 | 33 |
from .test_all import create_superuser |
34 | 34 | |
35 | 35 |
tests/admin_pages/test_user.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
5 | 4 | |
6 | 5 |
from wcs import fields |
7 | 6 |
from wcs.admin.settings import UserFieldsFormDef |
8 | 7 |
from wcs.qommon.http_request import HTTPRequest |
9 | 8 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
10 | 9 | |
10 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
11 | 11 |
from .test_all import create_role, create_superuser |
12 | 12 | |
13 | 13 |
tests/admin_pages/test_workflow.py | ||
---|---|---|
13 | 13 | |
14 | 14 |
import pytest |
15 | 15 |
from quixote.http_request import Upload as QuixoteUpload |
16 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | 16 |
from webtest import Upload |
18 | 17 | |
19 | 18 |
from wcs import fields |
... | ... | |
45 | 44 |
item_classes, |
46 | 45 |
) |
47 | 46 | |
47 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
48 | 48 |
from .test_all import create_superuser |
49 | 49 | |
50 | 50 |
tests/admin_pages/test_wscall.py | ||
---|---|---|
4 | 4 |
import xml.etree.ElementTree as ET |
5 | 5 | |
6 | 6 |
import pytest |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
8 | 7 |
from webtest import Upload |
9 | 8 | |
10 | 9 |
from wcs.qommon.http_request import HTTPRequest |
11 | 10 |
from wcs.wscalls import NamedWsCall |
12 | 11 | |
12 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
13 | 13 |
from .test_all import create_superuser |
14 | 14 | |
15 | 15 |
tests/api/test_access.py | ||
---|---|---|
11 | 11 |
import pytest |
12 | 12 |
from django.utils.encoding import force_bytes |
13 | 13 |
from quixote import get_publisher |
14 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
15 | 14 | |
16 | 15 |
from wcs.api_utils import get_secret_and_orig, is_url_signed, sign_url |
17 | 16 |
from wcs.qommon.errors import AccessForbiddenError |
18 | 17 |
from wcs.qommon.http_request import HTTPRequest |
19 | 18 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
20 | 19 | |
20 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
21 | ||
21 | 22 | |
22 | 23 |
def pytest_generate_tests(metafunc): |
23 | 24 |
if 'pub' in metafunc.fixturenames: |
tests/api/test_all.py | ||
---|---|---|
7 | 7 |
import mock |
8 | 8 |
import pytest |
9 | 9 |
from quixote import get_publisher |
10 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
11 | 10 | |
12 | 11 |
from wcs.api_utils import sign_url |
13 | 12 |
from wcs.formdef import FormDef |
14 | 13 |
from wcs.qommon.afterjobs import AfterJob |
15 | 14 |
from wcs.qommon.http_request import HTTPRequest |
16 | 15 | |
16 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
17 | ||
17 | 18 | |
18 | 19 |
def pytest_generate_tests(metafunc): |
19 | 20 |
if 'pub' in metafunc.fixturenames: |
tests/api/test_carddef.py | ||
---|---|---|
11 | 11 |
import pytest |
12 | 12 |
from django.utils.encoding import force_text |
13 | 13 |
from quixote import get_publisher |
14 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
15 | 14 | |
16 | 15 |
from wcs import fields, qommon |
17 | 16 |
from wcs.api_utils import sign_url |
... | ... | |
23 | 22 |
from wcs.qommon.upload_storage import PicklableUpload |
24 | 23 |
from wcs.workflows import Workflow, WorkflowBackofficeFieldsFormDef |
25 | 24 | |
25 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
26 | 26 |
from .utils import sign_uri |
27 | 27 | |
28 | 28 |
tests/api/test_category.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
import pytest |
6 | 6 |
from quixote import get_publisher |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
8 | 7 | |
9 | 8 |
from wcs.categories import Category |
10 | 9 |
from wcs.formdef import FormDef |
11 | 10 |
from wcs.qommon.http_request import HTTPRequest |
12 | 11 | |
12 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
13 | 13 |
from .utils import sign_uri |
14 | 14 | |
15 | 15 |
tests/api/test_custom_view.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
import pytest |
9 | 9 |
from quixote import get_publisher |
10 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
11 | 10 | |
12 | 11 |
from wcs import fields |
13 | 12 |
from wcs.carddef import CardDef |
... | ... | |
15 | 14 |
from wcs.qommon import ods |
16 | 15 |
from wcs.qommon.http_request import HTTPRequest |
17 | 16 | |
17 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
18 | 18 |
from .utils import sign_uri |
19 | 19 | |
20 | 20 |
tests/api/test_formdata.py | ||
---|---|---|
12 | 12 |
import pytest |
13 | 13 |
from django.utils.encoding import force_bytes |
14 | 14 |
from quixote import get_publisher |
15 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
16 | 15 | |
17 | 16 |
from wcs import fields |
18 | 17 |
from wcs.blocks import BlockDef |
... | ... | |
25 | 24 |
from wcs.qommon.upload_storage import PicklableUpload |
26 | 25 |
from wcs.workflows import EditableWorkflowStatusItem, Workflow, WorkflowBackofficeFieldsFormDef |
27 | 26 | |
27 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
28 | 28 |
from .utils import sign_uri |
29 | 29 | |
30 | 30 |
tests/api/test_formdef.py | ||
---|---|---|
12 | 12 |
import pytest |
13 | 13 |
from django.utils.encoding import force_text |
14 | 14 |
from quixote import get_publisher |
15 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
16 | 15 | |
17 | 16 |
from wcs import fields, qommon |
18 | 17 |
from wcs.api_utils import sign_url |
... | ... | |
23 | 22 |
from wcs.wf.jump import JumpWorkflowStatusItem |
24 | 23 |
from wcs.workflows import Workflow, WorkflowBackofficeFieldsFormDef |
25 | 24 | |
25 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
26 | 26 |
from .utils import sign_uri |
27 | 27 | |
28 | 28 |
tests/api/test_user.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import pytest |
7 | 7 |
from quixote import get_publisher |
8 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
9 | 8 | |
10 | 9 |
from wcs import fields |
11 | 10 |
from wcs.admin.settings import UserFieldsFormDef |
... | ... | |
15 | 14 |
from wcs.qommon.upload_storage import PicklableUpload |
16 | 15 |
from wcs.workflows import Workflow, WorkflowVariablesFieldsFormDef |
17 | 16 | |
17 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
18 | 18 |
from .utils import sign_uri |
19 | 19 | |
20 | 20 |
tests/api/test_utils.py | ||
---|---|---|
1 | 1 |
import pytest |
2 | 2 |
from quixote import cleanup, get_response |
3 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
4 | 3 | |
5 | 4 |
from wcs import sessions |
6 | 5 |
from wcs.api_utils import get_query_flag |
7 | 6 |
from wcs.qommon.http_request import HTTPRequest |
8 | 7 | |
8 |
from ..utilities import clean_temporary_pub, create_temporary_pub |
|
9 | ||
9 | 10 | |
10 | 11 |
def setup_module(module): |
11 | 12 |
cleanup() |
tests/api/test_workflow.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
import pytest |
6 | 6 |
from quixote import get_publisher |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
8 | 7 | |
9 | 8 |
from wcs import fields |
10 | 9 |
from wcs.formdef import FormDef |
... | ... | |
14 | 13 |
from wcs.wf.register_comment import RegisterCommenterWorkflowStatusItem |
15 | 14 |
from wcs.workflows import Workflow |
16 | 15 | |
16 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
17 | 17 |
from .utils import sign_uri |
18 | 18 | |
19 | 19 |
tests/backoffice_pages/test_all.py | ||
---|---|---|
13 | 13 |
import pytest |
14 | 14 |
from quixote import get_publisher |
15 | 15 |
from quixote.http_request import Upload as QuixoteUpload |
16 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | 16 | |
18 | 17 |
import wcs.qommon.storage as st |
19 | 18 |
from wcs import fields |
... | ... | |
48 | 47 |
) |
49 | 48 |
from wcs.wscalls import NamedWsCall |
50 | 49 | |
50 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
51 | ||
51 | 52 | |
52 | 53 |
def pytest_generate_tests(metafunc): |
53 | 54 |
if 'pub' in metafunc.fixturenames: |
tests/backoffice_pages/test_carddata.py | ||
---|---|---|
4 | 4 |
import uuid |
5 | 5 | |
6 | 6 |
import pytest |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
8 | 7 |
from webtest import Upload |
9 | 8 | |
10 | 9 |
from wcs import fields |
... | ... | |
16 | 15 |
from wcs.wf.wscall import WebserviceCallStatusItem |
17 | 16 |
from wcs.workflows import ChoiceWorkflowStatusItem, Workflow |
18 | 17 | |
18 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
19 | 19 |
from .test_all import create_user |
20 | 20 | |
21 | 21 |
tests/backoffice_pages/test_custom_view.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
import pytest |
6 | 6 |
from quixote import get_publisher |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
8 | 7 | |
9 | 8 |
from wcs import fields |
10 | 9 |
from wcs.carddef import CardDef |
... | ... | |
12 | 11 |
from wcs.qommon.http_request import HTTPRequest |
13 | 12 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
14 | 13 | |
14 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
15 | 15 |
from .test_all import create_superuser, create_user |
16 | 16 | |
17 | 17 |
tests/backoffice_pages/test_export.py | ||
---|---|---|
9 | 9 |
import zipfile |
10 | 10 | |
11 | 11 |
import pytest |
12 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
13 | 12 | |
14 | 13 |
from wcs import fields |
15 | 14 |
from wcs.blocks import BlockDef |
... | ... | |
18 | 17 |
from wcs.qommon.http_request import HTTPRequest |
19 | 18 |
from wcs.qommon.upload_storage import PicklableUpload |
20 | 19 | |
20 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
21 | 21 |
from .test_all import create_superuser |
22 | 22 | |
23 | 23 |
tests/backoffice_pages/test_submission.py | ||
---|---|---|
6 | 6 |
import urllib.parse |
7 | 7 | |
8 | 8 |
import pytest |
9 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
10 | 9 | |
11 | 10 |
from wcs import fields |
12 | 11 |
from wcs.api_utils import sign_url |
... | ... | |
18 | 17 |
from wcs.wf.redirect_to_url import RedirectToUrlWorkflowStatusItem |
19 | 18 |
from wcs.workflows import Workflow, WorkflowBackofficeFieldsFormDef |
20 | 19 | |
20 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
21 | 21 |
from .test_all import create_superuser, create_user |
22 | 22 | |
23 | 23 |
tests/conftest.py | ||
---|---|---|
2 | 2 |
import os |
3 | 3 | |
4 | 4 |
import pytest |
5 |
from utilities import EmailsMocking, HttpRequestsMocking, SMSMocking |
|
5 | ||
6 |
from .utilities import EmailsMocking, HttpRequestsMocking, SMSMocking |
|
6 | 7 | |
7 | 8 | |
8 | 9 |
def site_options(request, pub, section, variable, value): |
tests/form_pages/test_all.py | ||
---|---|---|
20 | 20 |
Image = None |
21 | 21 | |
22 | 22 |
from django.utils.encoding import force_bytes, force_text |
23 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
24 | 23 | |
25 | 24 |
from wcs import fields |
26 | 25 |
from wcs.blocks import BlockDef |
... | ... | |
53 | 52 |
WorkflowVariablesFieldsFormDef, |
54 | 53 |
) |
55 | 54 | |
55 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
56 | ||
56 | 57 | |
57 | 58 |
def assert_equal_zip(stream1, stream2): |
58 | 59 |
z1 = zipfile.ZipFile(stream1) |
tests/form_pages/test_block.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import mock |
7 | 7 |
import pytest |
8 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
9 | 8 |
from webtest import Upload |
10 | 9 | |
11 | 10 |
from wcs import fields |
... | ... | |
16 | 15 |
from wcs.wf.form import FormWorkflowStatusItem, WorkflowFormFieldsFormDef |
17 | 16 |
from wcs.workflows import Workflow |
18 | 17 | |
18 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
19 | 19 |
from .test_all import create_user |
20 | 20 | |
21 | 21 |
tests/form_pages/test_formdata.py | ||
---|---|---|
13 | 13 |
import pytest |
14 | 14 |
from django.utils.encoding import force_bytes |
15 | 15 |
from quixote.http_request import Upload as QuixoteUpload |
16 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | 16 |
from webtest import Hidden, Upload |
18 | 17 | |
19 | 18 |
from wcs import fields |
... | ... | |
33 | 32 |
) |
34 | 33 |
from wcs.wscalls import NamedWsCall |
35 | 34 | |
35 |
from ..utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
36 | 36 |
from .test_all import create_user, create_user_and_admin |
37 | 37 | |
38 | 38 |
tests/test_auth_pages.py | ||
---|---|---|
1 | 1 |
import http.cookies |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
5 | 4 | |
6 | 5 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
7 | 6 | |
7 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
8 | ||
8 | 9 | |
9 | 10 |
@pytest.fixture |
10 | 11 |
def pub(): |
tests/test_carddef.py | ||
---|---|---|
2 | 2 |
import xml.etree.ElementTree as ET |
3 | 3 | |
4 | 4 |
import pytest |
5 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
6 | 5 | |
7 | 6 |
from wcs.carddef import CardDef |
8 | 7 |
from wcs.categories import CardDefCategory |
... | ... | |
11 | 10 |
from wcs.qommon.misc import indent_xml as indent |
12 | 11 |
from wcs.qommon.template import Template |
13 | 12 | |
13 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
14 | ||
14 | 15 | |
15 | 16 |
def pytest_generate_tests(metafunc): |
16 | 17 |
if 'pub' in metafunc.fixturenames: |
tests/test_categories.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import pytest |
7 | 7 |
from quixote import cleanup |
8 |
from utilities import create_temporary_pub |
|
9 | 8 | |
10 | 9 |
from wcs.categories import CardDefCategory, Category |
11 | 10 | |
11 |
from .utilities import create_temporary_pub |
|
12 | ||
12 | 13 | |
13 | 14 |
def setup_module(module): |
14 | 15 |
cleanup() |
tests/test_convert_to_sql.py | ||
---|---|---|
7 | 7 |
from django.core.management import call_command, get_commands |
8 | 8 |
from django.core.management.base import CommandError |
9 | 9 |
from quixote import get_publisher |
10 |
from utilities import clean_temporary_pub, create_temporary_pub, force_connections_close |
|
11 | 10 | |
12 | 11 |
from wcs.fields import BoolField |
13 | 12 |
from wcs.formdef import FormDef |
14 | 13 |
from wcs.sql import cleanup_connection |
15 | 14 | |
15 |
from .utilities import clean_temporary_pub, create_temporary_pub, force_connections_close |
|
16 | ||
16 | 17 | |
17 | 18 |
@pytest.fixture |
18 | 19 |
def formdeffix(): |
tests/test_ctl.py | ||
---|---|---|
7 | 7 |
import psycopg2 |
8 | 8 |
import pytest |
9 | 9 |
from django.core.management import CommandError, call_command |
10 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
11 | 10 | |
12 | 11 |
import wcs.qommon.ctl |
13 | 12 |
from wcs.ctl.delete_tenant import CmdDeleteTenant |
... | ... | |
26 | 25 |
from wcs.wf.jump import JumpWorkflowStatusItem |
27 | 26 |
from wcs.workflows import Workflow, WorkflowStatusItem |
28 | 27 | |
28 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
29 | ||
29 | 30 | |
30 | 31 |
@pytest.fixture |
31 | 32 |
def pub(): |
tests/test_datasource.py | ||
---|---|---|
8 | 8 | |
9 | 9 |
import mock |
10 | 10 |
import pytest |
11 |
from test_widgets import MockHtmlForm, mock_form_submission |
|
12 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
13 | 11 | |
14 | 12 |
from wcs import data_sources, fields |
15 | 13 |
from wcs.data_sources import NamedDataSource, register_data_source_function |
16 | 14 |
from wcs.qommon.form import Form, get_request |
17 | 15 |
from wcs.qommon.http_request import HTTPRequest |
18 | 16 | |
17 |
from .test_widgets import MockHtmlForm, mock_form_submission |
|
18 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
19 | ||
19 | 20 | |
20 | 21 |
def pytest_generate_tests(metafunc): |
21 | 22 |
if 'pub' in metafunc.fixturenames: |
tests/test_datasource_chrono.py | ||
---|---|---|
7 | 7 |
import mock |
8 | 8 |
import pytest |
9 | 9 |
from quixote import cleanup |
10 |
from utilities import create_temporary_pub |
|
11 | 10 | |
12 | 11 |
from wcs import fields |
13 | 12 |
from wcs.data_sources import NamedDataSource, build_agenda_datasources, collect_agenda_data |
... | ... | |
15 | 14 |
from wcs.qommon.http_request import HTTPRequest |
16 | 15 |
from wcs.qommon.misc import ConnectionError |
17 | 16 | |
17 |
from .utilities import create_temporary_pub |
|
18 | ||
18 | 19 | |
19 | 20 |
def setup_module(module): |
20 | 21 |
cleanup() |
tests/test_ezt.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
import pytest |
6 | 6 |
from quixote import cleanup |
7 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
8 | 7 | |
9 | 8 |
from wcs.qommon.ezt import ( |
10 | 9 |
ArgCountSyntaxError, |
... | ... | |
16 | 15 |
) |
17 | 16 |
from wcs.scripts import ScriptsSubstitutionProxy |
18 | 17 | |
18 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
19 | ||
19 | 20 | |
20 | 21 |
def setup_module(module): |
21 | 22 |
cleanup() |
tests/test_fc_auth.py | ||
---|---|---|
5 | 5 |
import mock |
6 | 6 |
from django.utils.encoding import force_bytes, force_text |
7 | 7 |
from quixote import cleanup, get_session_manager |
8 |
from utilities import create_temporary_pub, get_app |
|
8 | ||
9 |
from .utilities import create_temporary_pub, get_app |
|
9 | 10 | |
10 | 11 |
PROFILE = { |
11 | 12 |
'fields': [ |
tests/test_fields.py | ||
---|---|---|
7 | 7 |
from bs4 import BeautifulSoup |
8 | 8 |
from quixote import cleanup |
9 | 9 |
from quixote.http_request import Upload |
10 |
from utilities import MockSubstitutionVariables, create_temporary_pub |
|
11 | 10 | |
12 | 11 |
from wcs import fields |
13 | 12 |
from wcs.formdef import FormDef |
... | ... | |
17 | 16 |
from wcs.qommon.upload_storage import PicklableUpload |
18 | 17 |
from wcs.variables import LazyFormData |
19 | 18 | |
19 |
from .utilities import MockSubstitutionVariables, create_temporary_pub |
|
20 | ||
20 | 21 | |
21 | 22 |
def setup_module(module): |
22 | 23 |
cleanup() |
tests/test_formdata.py | ||
---|---|---|
8 | 8 |
import pytest |
9 | 9 |
from quixote import get_publisher |
10 | 10 |
from quixote.http_request import Upload |
11 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
12 | 11 | |
13 | 12 |
from wcs import fields, formdef, sessions |
14 | 13 |
from wcs.blocks import BlockDef |
... | ... | |
31 | 30 |
WorkflowStatusItem, |
32 | 31 |
) |
33 | 32 | |
33 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
34 | ||
34 | 35 | |
35 | 36 |
def pytest_generate_tests(metafunc): |
36 | 37 |
if 'pub' in metafunc.fixturenames: |
tests/test_formdef.py | ||
---|---|---|
11 | 11 |
import pytest |
12 | 12 |
from django.utils.encoding import force_bytes |
13 | 13 |
from quixote import cleanup |
14 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
15 | 14 | |
16 | 15 |
from wcs import fields |
17 | 16 |
from wcs.blocks import BlockDef |
... | ... | |
22 | 21 |
from wcs.wf.form import FormWorkflowStatusItem, WorkflowFormFieldsFormDef |
23 | 22 |
from wcs.workflows import AttachmentEvolutionPart, Workflow, WorkflowBackofficeFieldsFormDef |
24 | 23 | |
24 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
25 | ||
25 | 26 | |
26 | 27 |
def pytest_generate_tests(metafunc): |
27 | 28 |
if 'pub' in metafunc.fixturenames: |
tests/test_formdef_import.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
import pytest |
9 | 9 |
from quixote import cleanup |
10 |
from utilities import create_temporary_pub |
|
11 | 10 | |
12 | 11 |
from wcs.carddef import CardDef |
13 | 12 |
from wcs.categories import Category |
... | ... | |
15 | 14 |
from wcs.qommon.misc import indent_xml as indent |
16 | 15 |
from wcs.workflows import Workflow |
17 | 16 | |
17 |
from .utilities import create_temporary_pub |
|
18 | ||
18 | 19 | |
19 | 20 |
def setup_module(module): |
20 | 21 |
cleanup() |
tests/test_hobo.py | ||
---|---|---|
12 | 12 |
import mock |
13 | 13 |
import pytest |
14 | 14 |
from quixote import cleanup |
15 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
16 | 15 | |
17 | 16 |
from wcs import fields, sql |
18 | 17 |
from wcs.ctl.check_hobos import CmdCheckHobos |
19 | 18 |
from wcs.publisher import WcsPublisher |
20 | 19 |
from wcs.qommon import force_str |
21 | 20 | |
21 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
22 | ||
22 | 23 |
HOBO_JSON = { |
23 | 24 |
'services': [ |
24 | 25 |
{ |
tests/test_hobo_notify.py | ||
---|---|---|
2 | 2 |
import uuid |
3 | 3 | |
4 | 4 |
import pytest |
5 |
from utilities import create_temporary_pub |
|
6 | 5 | |
7 | 6 |
from wcs.ctl.hobo_notify import CmdHoboNotify |
8 | 7 |
from wcs.qommon import force_str |
9 | 8 |
from wcs.qommon import storage as st |
10 | 9 |
from wcs.qommon.http_request import HTTPRequest |
11 | 10 | |
11 |
from .utilities import create_temporary_pub |
|
12 | ||
12 | 13 | |
13 | 14 |
def pytest_generate_tests(metafunc): |
14 | 15 |
if 'pub' in metafunc.fixturenames: |
tests/test_mail_templates.py | ||
---|---|---|
8 | 8 |
import pytest |
9 | 9 |
from django.utils.encoding import force_bytes |
10 | 10 |
from quixote import cleanup |
11 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
12 | 11 |
from webtest import Upload |
13 | 12 | |
14 | 13 |
from wcs.fields import FileField |
... | ... | |
19 | 18 |
from wcs.qommon.upload_storage import PicklableUpload |
20 | 19 |
from wcs.workflows import SendmailWorkflowStatusItem, Workflow |
21 | 20 | |
21 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
22 | ||
22 | 23 | |
23 | 24 |
def setup_module(module): |
24 | 25 |
cleanup() |
tests/test_misc.py | ||
---|---|---|
15 | 15 |
from django.core.cache import cache |
16 | 16 |
from django.utils import translation |
17 | 17 |
from quixote import cleanup |
18 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
19 | 18 | |
20 | 19 |
import wcs.api # workaround against circular dependencies :/ |
21 | 20 |
import wcs.qommon.storage |
... | ... | |
43 | 42 |
from wcs.wf.jump import JumpWorkflowStatusItem |
44 | 43 |
from wcs.workflows import Workflow |
45 | 44 | |
45 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
46 | ||
46 | 47 | |
47 | 48 |
def setup_module(module): |
48 | 49 |
cleanup() |
tests/test_prefill.py | ||
---|---|---|
3 | 3 | |
4 | 4 |
import pytest |
5 | 5 |
from quixote import cleanup, get_request |
6 |
from utilities import create_temporary_pub |
|
7 | 6 | |
8 | 7 |
from wcs import fields |
9 | 8 |
from wcs.carddef import CardDef |
10 | 9 |
from wcs.qommon.http_request import HTTPRequest |
11 | 10 | |
11 |
from .utilities import create_temporary_pub |
|
12 | ||
12 | 13 | |
13 | 14 |
def setup_module(module): |
14 | 15 |
cleanup() |
tests/test_publisher.py | ||
---|---|---|
19 | 19 |
from django.test import override_settings |
20 | 20 |
from django.utils.encoding import force_text |
21 | 21 |
from quixote import cleanup |
22 |
from utilities import create_temporary_pub |
|
23 | 22 | |
24 | 23 |
from wcs.qommon import get_publisher_class |
25 | 24 |
from wcs.qommon.afterjobs import AfterJob |
26 | 25 |
from wcs.qommon.cron import CronJob |
27 | 26 |
from wcs.qommon.http_request import HTTPRequest |
28 | 27 | |
28 |
from .utilities import create_temporary_pub |
|
29 | ||
29 | 30 | |
30 | 31 |
def setup_module(module): |
31 | 32 |
cleanup() |
tests/test_register.py | ||
---|---|---|
6 | 6 | |
7 | 7 |
import pytest |
8 | 8 |
from quixote import cleanup |
9 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
10 | 9 | |
11 | 10 |
from wcs.qommon import force_str |
12 | 11 |
from wcs.qommon.http_request import HTTPRequest |
13 | 12 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
14 | 13 | |
14 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
15 | ||
15 | 16 | |
16 | 17 |
def pytest_generate_tests(metafunc): |
17 | 18 |
if 'pub' in metafunc.fixturenames: |
tests/test_role.py | ||
---|---|---|
3 | 3 |
import pickle |
4 | 4 | |
5 | 5 |
from quixote import get_publisher |
6 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
7 | 6 | |
8 | 7 |
from wcs.roles import get_user_roles |
9 | 8 | |
9 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
10 | ||
10 | 11 | |
11 | 12 |
def setup_module(module): |
12 | 13 |
pub = create_temporary_pub() |
tests/test_rootdirectory.py | ||
---|---|---|
4 | 4 | |
5 | 5 |
import pytest |
6 | 6 |
from quixote import cleanup |
7 |
from utilities import create_temporary_pub, get_app |
|
8 | 7 | |
9 | 8 |
import wcs.forms.root |
10 | 9 |
from wcs import formdef |
... | ... | |
13 | 12 |
from wcs.qommon import sessions |
14 | 13 |
from wcs.qommon.http_request import HTTPRequest |
15 | 14 | |
15 |
from .utilities import create_temporary_pub, get_app |
|
16 | ||
16 | 17 | |
17 | 18 |
def setup_module(module): |
18 | 19 |
cleanup() |
tests/test_saml2utils.py | ||
---|---|---|
1 | 1 |
import shutil |
2 | 2 | |
3 | 3 |
from quixote import cleanup |
4 |
from utilities import create_temporary_pub |
|
5 | 4 | |
6 | 5 |
from wcs.qommon import x509utils |
7 | 6 |
from wcs.qommon.saml2utils import Metadata |
8 | 7 | |
8 |
from .utilities import create_temporary_pub |
|
9 | ||
9 | 10 | |
10 | 11 |
def setup_module(module): |
11 | 12 |
cleanup() |
tests/test_saml_auth.py | ||
---|---|---|
13 | 13 |
import pytest |
14 | 14 |
from quixote import cleanup, get_session, get_session_manager |
15 | 15 |
from quixote.errors import RequestError |
16 |
from test_hobo_notify import PROFILE |
|
17 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
18 | 16 | |
19 | 17 |
from wcs.qommon import sessions, x509utils |
20 | 18 |
from wcs.qommon.http_request import HTTPRequest |
... | ... | |
22 | 20 |
from wcs.qommon.misc import get_lasso_server |
23 | 21 |
from wcs.qommon.saml2 import Saml2Directory |
24 | 22 | |
23 |
from .test_hobo_notify import PROFILE |
|
24 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
25 | ||
25 | 26 |
pytestmark = pytest.mark.skipif('lasso is None') |
26 | 27 | |
27 | 28 |
IDP_METADATA = """<?xml version="1.0"?> |
tests/test_sessions.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import pytest |
7 | 7 |
from quixote import cleanup |
8 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
9 | 8 | |
10 | 9 |
from wcs import fields |
11 | 10 |
from wcs.formdef import FormDef |
12 | 11 |
from wcs.qommon.http_request import HTTPRequest |
13 | 12 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
14 | 13 | |
14 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
15 | ||
15 | 16 | |
16 | 17 |
def setup_module(): |
17 | 18 |
clean_temporary_pub() |
tests/test_snapshots.py | ||
---|---|---|
4 | 4 |
import xml.etree.ElementTree as ET |
5 | 5 | |
6 | 6 |
import pytest |
7 |
from admin_pages.test_all import create_role, create_superuser |
|
8 | 7 |
from quixote.http_request import Upload |
9 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
10 | 8 | |
11 | 9 |
from wcs.blocks import BlockDef |
12 | 10 |
from wcs.carddef import CardDef |
... | ... | |
20 | 18 |
from wcs.workflows import Workflow |
21 | 19 |
from wcs.wscalls import NamedWsCall |
22 | 20 | |
21 |
from .admin_pages.test_all import create_role, create_superuser |
|
22 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
23 | ||
23 | 24 | |
24 | 25 |
@pytest.fixture |
25 | 26 |
def pub(request, emails): |
tests/test_sql.py | ||
---|---|---|
13 | 13 |
import pytest |
14 | 14 |
from django.core.management import call_command |
15 | 15 |
from quixote import cleanup |
16 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
17 | 16 | |
18 | 17 |
import wcs.qommon.storage as st |
19 | 18 |
from wcs import fields, publisher, sql |
... | ... | |
24 | 23 |
from wcs.wf.register_comment import RegisterCommenterWorkflowStatusItem |
25 | 24 |
from wcs.workflows import CommentableWorkflowStatusItem, Workflow, WorkflowCriticalityLevel |
26 | 25 | |
26 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
27 | ||
27 | 28 |
postgresql = pytest.mark.postgresql |
28 | 29 | |
29 | 30 |
try: |
tests/test_storage.py | ||
---|---|---|
6 | 6 | |
7 | 7 |
import pytest |
8 | 8 |
from quixote import cleanup |
9 |
from utilities import create_temporary_pub |
|
10 | 9 | |
11 | 10 |
import wcs.qommon.storage as st |
12 | 11 |
from wcs.carddef import CardDef |
13 | 12 |
from wcs.formdef import FormDef |
14 | 13 |
from wcs.qommon.storage import StorableObject, cache_umask |
15 | 14 | |
15 |
from .utilities import create_temporary_pub |
|
16 | ||
16 | 17 | |
17 | 18 |
def setup_module(module): |
18 | 19 |
cleanup() |
tests/test_templates.py | ||
---|---|---|
13 | 13 | |
14 | 14 |
from django.test import override_settings |
15 | 15 |
from django.utils.timezone import now |
16 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
17 | 16 | |
18 | 17 |
from wcs import fields |
19 | 18 |
from wcs.formdef import FormDef |
... | ... | |
22 | 21 |
from wcs.qommon.template import Template, TemplateError |
23 | 22 |
from wcs.variables import LazyFormData |
24 | 23 | |
24 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
25 | ||
25 | 26 | |
26 | 27 |
@pytest.fixture |
27 | 28 |
def pub(): |
tests/test_texts.py | ||
---|---|---|
2 | 2 |
import sys |
3 | 3 | |
4 | 4 |
from quixote import cleanup |
5 |
from utilities import MockSubstitutionVariables, create_temporary_pub |
|
6 | 5 | |
7 | 6 |
from wcs.qommon.admin.texts import TextsDirectory |
8 | 7 |
from wcs.qommon.http_request import HTTPRequest |
9 | 8 | |
9 |
from .utilities import MockSubstitutionVariables, create_temporary_pub |
|
10 | ||
10 | 11 | |
11 | 12 |
def setup_module(module): |
12 | 13 |
cleanup() |
tests/test_tracking_code.py | ||
---|---|---|
1 | 1 |
import pytest |
2 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
3 | 2 | |
4 | 3 |
from wcs.formdef import FormDef |
5 | 4 | |
5 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
6 | ||
6 | 7 | |
7 | 8 |
def pytest_generate_tests(metafunc): |
8 | 9 |
if 'pub' in metafunc.fixturenames: |
tests/test_upload_storage.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import mock |
7 | 7 |
import pytest |
8 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
9 | 8 |
from webtest import Upload |
10 | 9 | |
11 | 10 |
from wcs import fields |
... | ... | |
14 | 13 |
from wcs.qommon.ident.password_accounts import PasswordAccount |
15 | 14 |
from wcs.wf.register_comment import RegisterCommenterWorkflowStatusItem |
16 | 15 | |
16 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app, login |
|
17 | ||
17 | 18 | |
18 | 19 |
def pytest_generate_tests(metafunc): |
19 | 20 |
if 'pub' in metafunc.fixturenames: |
tests/test_users.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
import pytest |
9 | 9 |
from quixote import cleanup |
10 |
from utilities import create_temporary_pub |
|
11 | 10 | |
12 | 11 |
from wcs import fields, publisher |
13 | 12 |
from wcs.variables import LazyUser |
14 | 13 | |
14 |
from .utilities import create_temporary_pub |
|
15 | ||
15 | 16 | |
16 | 17 |
def setup_module(module): |
17 | 18 |
cleanup() |
tests/test_variadic_url.py | ||
---|---|---|
1 | 1 |
import pytest |
2 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
3 | 2 | |
4 | 3 |
from wcs.qommon.ezt import EZTException |
5 | 4 |
from wcs.qommon.misc import get_variadic_url |
6 | 5 | |
6 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
7 | ||
7 | 8 | |
8 | 9 |
@pytest.fixture |
9 | 10 |
def pub(request): |
tests/test_widgets.py | ||
---|---|---|
8 | 8 |
import pytest |
9 | 9 |
from quixote import cleanup, get_response |
10 | 10 |
from quixote.http_request import parse_query |
11 |
from utilities import create_temporary_pub |
|
12 | 11 | |
13 | 12 |
from wcs.qommon import sessions |
14 | 13 |
from wcs.qommon.form import * |
15 | 14 |
from wcs.qommon.http_request import HTTPRequest |
16 | 15 |
from wcs.wf.profile import ProfileUpdateRowWidget |
17 | 16 | |
17 |
from .utilities import create_temporary_pub |
|
18 | ||
18 | 19 | |
19 | 20 |
def setup_module(module): |
20 | 21 |
cleanup() |
tests/test_workflow_import.py | ||
---|---|---|
5 | 5 | |
6 | 6 |
import pytest |
7 | 7 |
from quixote.http_request import Upload |
8 |
from utilities import clean_temporary_pub, create_temporary_pub |
|
9 | 8 | |
10 | 9 |
from wcs.carddef import CardDef |
11 | 10 |
from wcs.fields import FileField, StringField |
... | ... | |
39 | 38 |
WorkflowVariablesFieldsFormDef, |
40 | 39 |
) |
41 | 40 | |
41 |
from .utilities import clean_temporary_pub, create_temporary_pub |
|
42 | ||
42 | 43 | |
43 | 44 |
@pytest.fixture |
44 | 45 |
def pub(request): |
tests/test_workflows.py | ||
---|---|---|
19 | 19 |
from django.utils.encoding import force_bytes, force_text |
20 | 20 |
from quixote import cleanup, get_response |
21 | 21 |
from quixote.http_request import Upload as QuixoteUpload |
22 |
from utilities import MockSubstitutionVariables, clean_temporary_pub, create_temporary_pub |
|
23 | 22 | |
24 | 23 |
from wcs import sessions |
25 | 24 |
from wcs.blocks import BlockDef |
... | ... | |
88 | 87 |
perform_items, |
89 | 88 |
) |
90 | 89 | |
90 |
from .utilities import MockSubstitutionVariables, clean_temporary_pub, create_temporary_pub |
|
91 | ||
91 | 92 | |
92 | 93 |
def setup_module(module): |
93 | 94 |
cleanup() |
tests/test_wscall.py | ||
---|---|---|
1 | 1 |
import json |
2 | 2 | |
3 | 3 |
import pytest |
4 |
from utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
5 | 4 | |
6 | 5 |
from wcs import fields |
7 | 6 |
from wcs.formdef import FormDef |
... | ... | |
9 | 8 |
from wcs.qommon.template import Template |
10 | 9 |
from wcs.wscalls import NamedWsCall |
11 | 10 | |
11 |
from .utilities import clean_temporary_pub, create_temporary_pub, get_app |
|
12 | ||
12 | 13 | |
13 | 14 |
@pytest.fixture |
14 | 15 |
def pub(): |
tox.ini | ||
---|---|---|
45 | 45 |
pre-commit |
46 | 46 |
commands = |
47 | 47 |
py.test -v {env:COVERAGE:} --junitxml=junit-{envname}.xml {posargs:tests/} |
48 |
pylint: ./pylint.sh wcs/ |
|
48 |
pylint: ./pylint.sh wcs/ tests/
|
|
49 | 49 |
codestyle: pre-commit run --all-files --show-diff-on-failure |
50 |
- |