Skip to content

Commit 3a836bb

Browse files
Remove skipped tests
1 parent bfad7ee commit 3a836bb

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

api_tests/base/test_utils.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from django.conf import settings as django_conf_settings
66

77
from rest_framework import fields
8-
from rest_framework.exceptions import ValidationError
98

109
from api.base import utils as api_utils
1110
from osf.models.base import coerce_guid, Guid, GuidMixin, OptionalGuidMixin, VersionedGuidMixin, InvalidGuid
@@ -63,49 +62,6 @@ def test_push_status_message_no_response(self):
6362
except BaseException:
6463
assert False, f'Exception from push_status_message via API v2 with type "{status}".'
6564

66-
@unittest.skip('[ANG-959] Make push_status_message NOOP (#11350)')
67-
def test_push_status_message_expected_error(self):
68-
status_message = 'This is a message'
69-
try:
70-
push_status_message(status_message, kind='error')
71-
assert False, 'push_status_message() should have generated a ValidationError exception.'
72-
73-
except ValidationError as e:
74-
assert (
75-
e.detail[0] == status_message
76-
), 'push_status_message() should have passed along the message with the Exception.'
77-
78-
except RuntimeError:
79-
assert False, 'push_status_message() should have caught the runtime error and replaced it.'
80-
81-
except BaseException:
82-
assert False, 'Exception from push_status_message when called from the v2 API with type "error"'
83-
84-
@unittest.skip('[ANG-959] Make push_status_message NOOP (#11350)')
85-
@mock.patch('framework.status.get_session')
86-
def test_push_status_message_unexpected_error(self, mock_get_session):
87-
status_message = 'This is a message'
88-
exception_message = 'this is some very unexpected problem'
89-
mock_session = mock.Mock()
90-
mock_session.attach_mock(mock.Mock(side_effect=RuntimeError(exception_message)), 'get')
91-
mock_get_session.return_value = mock_session
92-
try:
93-
push_status_message(status_message, kind='error')
94-
assert False, 'push_status_message() should have generated a RuntimeError exception.'
95-
except ValidationError:
96-
assert False, 'push_status_message() should have re-raised the RuntimeError not gotten ValidationError.'
97-
except RuntimeError as e:
98-
assert str(e) == exception_message, (
99-
'push_status_message() should have re-raised the '
100-
'original RuntimeError with the original message.'
101-
)
102-
103-
except BaseException:
104-
assert False, (
105-
'Unexpected Exception from push_status_message when called '
106-
'from the v2 API with type "error"'
107-
)
108-
10965

11066
@pytest.mark.django_db
11167
class TestCoerceGuid:

0 commit comments

Comments
 (0)