🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Flaky test: `test_sse_ping_with_last` (#1046)
Happened on mypyc wheels cp314-macosx_x86_64
For some reason
Let's fix it.
#bug #good_first_issue #help_wanted #django_modern_rest
sent via relator
📝 Flaky test: `test_sse_ping_with_last` (#1046)
Happened on mypyc wheels cp314-macosx_x86_64
=================================== FAILURES ===================================
___________________________ test_sse_ping_with_last ____________________________
dmr_async_rf = <dmr.test.DMRAsyncRequestFactory object at 0x114ddad60>
@pytest.mark.asyncio
async def test_sse_ping_with_last(
dmr_async_rf: DMRAsyncRequestFactory,
) -> None:
"""Ensures that valid sse produces valid results."""
request = dmr_async_rf.post('/whatever/', data={'produce_last': True})
response = await dmr_async_rf.wrap(_PingSSE.as_view()(request))
assert isinstance(response, StreamingResponse)
assert response.streaming
assert response.status_code == HTTPStatus.OK
assert response.headers == {
'Cache-Control': 'no-cache',
'Content-Type': 'text/event-stream',
'X-Accel-Buffering': 'no',
'Connection': 'keep-alive',
}
> assert await get_streaming_content(response) == (
b'data: 1\r\n'
b'\r\n'
b': ping\r\n'
b'\r\n'
b'data: 2\r\n'
b'\r\n'
b': ping\r\n'
b'\r\n'
b': ping\r\n'
b'\r\n'
b'data: 3\r\n'
b'\r\n'
)
E AssertionError: assert b'data: 1\r\n...ta: 3\r\n\r\n' == b'data: 1\r\n...ta: 3\r\n\r\n'
E
E At index 42 diff: b'd' != b':'
E
E Full diff:
E - (b'data: 1\r\n\r\n: ping\r\n\r\ndata: 2\r\n\r\n: ping\r\n\r\n: ping\r\n\r\ndata'
E ? --------------
E + (b'data: 1\r\n\r\n: ping\r\n\r\ndata: 2\r\n\r\n: ping\r\n\r\ndata: 3\r\n\r\n')
E ? +++++++++++ +
E - b': 3\r\n\r\n')
For some reason
data: 3 was not sent.Let's fix it.
#bug #good_first_issue #help_wanted #django_modern_rest
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Add default admin page for `dmr/security/jwt/blocklist` (#1054)
Right now our app for jwt blocklisting has a default model: https://github.com/wemake-services/django-modern-rest/blob/master/dmr/security/jwt/blocklist/models.py
But, it does not have a default
Good example: https://github.com/Dresdn/django-modern-rest/blob/3324d0aecf32509b5434df7e8826d7be6ddac7a8/dmr/security/token/admin.py
This is a very easy task :)
#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator
📝 Add default admin page for `dmr/security/jwt/blocklist` (#1054)
Right now our app for jwt blocklisting has a default model: https://github.com/wemake-services/django-modern-rest/blob/master/dmr/security/jwt/blocklist/models.py
But, it does not have a default
admin.py file.Good example: https://github.com/Dresdn/django-modern-rest/blob/3324d0aecf32509b5434df7e8826d7be6ddac7a8/dmr/security/token/admin.py
This is a very easy task :)
#feature #good_first_issue #help_wanted #django_modern_rest
sent via relator