Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more uses of nose tools #35107

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions corehq/apps/users/tests/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from decorator import contextmanager
from django.test import TestCase
from nose.tools import nottest, istest
from django.utils.functional import classproperty

from corehq.apps.domain.models import Domain
from corehq.apps.domain.shortcuts import create_domain
Expand All @@ -11,9 +11,12 @@
from corehq.apps.users.role_utils import UserRolePresets


@nottest
class BaseAuthorizationTest(TestCase):

@classproperty
def __test__(cls):
return cls is not BaseAuthorizationTest

@classmethod
def setUpTestData(cls):
cls.domain = 'my-domain'
Expand Down Expand Up @@ -141,7 +144,6 @@ def test_has_permission__default_yes__null_domain(self):
self.assertFalse(self.user.has_permission(None, 'report_an_issue'))


@istest
class TestMobileUserAuthorizationFunctions(BaseAuthorizationTest):
@classmethod
def _create_user(cls, domain):
Expand All @@ -164,7 +166,6 @@ def test_is_domain_admin__admin_role(self):
self.assertFalse(self.user.is_domain_admin(self.domain))


@istest
class TestWebUserAuthorizationFunctions(BaseAuthorizationTest):
@classmethod
def _create_user(cls, domain):
Expand All @@ -177,7 +178,6 @@ def _create_user(cls, domain):
)


@istest
class TestSuperUserAuthorizationFunctions(BaseAuthorizationTest):
@classmethod
def _create_user(cls, domain):
Expand Down
3 changes: 1 addition & 2 deletions corehq/tests/util/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from functools import wraps
from unittest import TestCase

from nose.tools import nottest

from corehq.tests.tools import nottest
from corehq.util.test_utils import unit_testing_only


Expand Down
Loading