Public bug reported:
Version 0.28.0-1
Log snippet:
```
98s =================================== FAILURES
===================================
98s ______________________________ test_i18n_strings
_______________________________
98s
98s no_warnings = <_pytest.capture.CaptureFixture object at 0x71935036c4b0>
98s
98s @mock.patch(
98s 'drf_spectacular.settings.spectacular_settings.DESCRIPTION',
98s _('Lazy translated description with missing translation')
98s )
98s def test_i18n_strings(no_warnings):
98s with translation.override('de-de'):
98s schema = generate_schema(None, patterns=urlpatterns)
98s > assert_schema(schema, 'tests/test_i18n.yml')
98s
98s tests/test_i18n.py:70:
98s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _
98s tests/__init__.py:46: in assert_schema
98s assert_equal(generated, expected)
98s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _
98s
98s actual = "openapi: 3.0.3\ninfo:\n title: ''\n version: 0.0.0\n
description: Lazy translated description with missing transla...n type:
http\n scheme: basic\n cookieAuth:\n type: apiKey\n in:
cookie\n name: sessionid\n"
98s expected = "openapi: 3.0.3\ninfo:\n title: ''\n version: 0.0.0\n
description: Lazy translated description with missing transla...n type:
http\n scheme: basic\n cookieAuth:\n type: apiKey\n in:
cookie\n name: sessionid\n"
98s
98s def assert_equal(actual, expected):
98s if not isinstance(actual, str):
98s actual = json.dumps(actual, indent=4)
98s if not isinstance(expected, str):
98s expected = json.dumps(expected, indent=4)
98s diff = difflib.unified_diff(
98s expected.splitlines(True),
98s actual.splitlines(True),
98s )
98s diff = ''.join(diff)
98s > assert actual == expected and not diff, diff
98s E AssertionError: ---
98s E +++
98s E @@ -106,7 +106,7 @@
98s E name: id
98s E schema:
98s E type: integer
98s E - description: A unique integer value identifying this
Internätiönalisierung.
98s E + description: Ein eindeutiger Ganzzahl-Wert, der
Internätiönalisierung identifiziert.
98s E required: true
98s E tags:
98s E - x
98s
98s tests/__init__.py:61: AssertionError
```
The test data will need updating to be inline with recent changes from
djangorestframework.
** Affects: python-drf-spectacular (Ubuntu)
Importance: Medium
Assignee: Tim Andersson (andersson123)
Status: In Progress
** Changed in: python-drf-spectacular (Ubuntu)
Assignee: (unassigned) => Tim Andersson (andersson123)
** Changed in: python-drf-spectacular (Ubuntu)
Importance: Undecided => Medium
** Changed in: python-drf-spectacular (Ubuntu)
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2121168
Title:
djangorestframework/3.16.1-1 breaks tests/test_i18n.py unit test
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-drf-spectacular/+bug/2121168/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs