TEST_MAIL_DIR = os.path.join(os.path.dirname(__file__), 'mail')
TEST_PATCH_DIR = os.path.join(os.path.dirname(__file__), 'patches')
TEST_FUZZ_DIR = os.path.join(os.path.dirname(__file__), 'fuzztests')
+TEST_SERIES_DIR = os.path.join(os.path.dirname(__file__), 'series')
# configure warnings
from rest_framework import status
from patchwork.models import Bundle
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_bundle
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_patch
from rest_framework import status
from patchwork.models import Check
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_check
from patchwork.tests.utils import create_patch
from patchwork.tests.utils import create_maintainer
from patchwork.models import PatchComment
from patchwork.models import CoverComment
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_cover
from patchwork.tests.utils import create_cover_comment
from patchwork.tests.utils import create_patch
from django.urls import reverse
from rest_framework import status
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_cover
from patchwork.tests.utils import create_covers
from patchwork.tests.utils import create_maintainer
from rest_framework import status
from patchwork.models import Event
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_check
from patchwork.tests.utils import create_cover
from patchwork.tests.utils import create_cover_comment
from rest_framework import status
from patchwork.models import Patch
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_patch
from patchwork.tests.utils import create_patches
from django.urls import reverse
from rest_framework import status
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_person
from patchwork.tests.utils import create_user
from rest_framework import status
from patchwork.models import Project
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_project
from patchwork.tests.utils import create_user
from patchwork.models import Patch
from patchwork.models import PatchRelation
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_patch
from patchwork.tests.utils import create_patches
from django.urls import reverse
from rest_framework import status
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_cover
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_patch
from django.urls import reverse
from rest_framework import status
-from patchwork.tests.api import utils
+from patchwork.tests.unit.api import utils
from patchwork.tests.utils import create_maintainer
from patchwork.tests.utils import create_user
from rest_framework.test import APIClient as BaseAPIClient
from rest_framework.test import APIRequestFactory
-from patchwork.tests.api import validator
+from patchwork.tests.unit.api import validator
from patchwork.tests.utils import create_user
os.pardir,
os.pardir,
os.pardir,
+ os.pardir,
'docs',
'api',
'samples',
os.pardir,
os.pardir,
os.pardir,
+ os.pardir,
'docs',
'api',
'schemas',
from patchwork import models
from patchwork import parser
+from patchwork.tests import TEST_SERIES_DIR
from patchwork.tests import utils
from patchwork.views.utils import patch_to_mbox
-TEST_SERIES_DIR = os.path.join(os.path.dirname(__file__), 'series')
-
-
class _BaseTestCase(TestCase):
def setUp(self):
utils.create_state()
DATABASE_NAME
DJANGO_TEST_PROCESSES
commands =
- python {toxinidir}/manage.py test --noinput --parallel -v 2 --timing -- {posargs:patchwork}
+ python {toxinidir}/manage.py test --noinput --parallel -v 2 --timing -- {posargs:patchwork.tests.unit}
[testenv:pep8]
deps =
DJANGO_SETTINGS_MODULE = patchwork.settings.dev
commands =
coverage erase
- coverage run --omit=*tox*,patchwork/tests/*.py,manage.py,patchwork/migrations/*.py \
- --branch {toxinidir}/manage.py test --noinput patchwork
+ coverage run --omit=*tox*,patchwork/tests/unit/*.py,manage.py,patchwork/migrations/*.py \
+ --branch {toxinidir}/manage.py test --noinput patchwork.tests.unit
coverage report -m
[gh-actions]