Projet

Général

Profil

0001-logged-errors-enable-thousand-separator-55815.patch

Lauréline Guérin, 27 juillet 2021 12:01

Télécharger (1,68 ko)

Voir les différences:

Subject: [PATCH] logged-errors: enable thousand separator (#55815)

 tests/admin_pages/test_logged_errors.py | 2 ++
 wcs/settings.py                         | 1 +
 2 files changed, 3 insertions(+)
tests/admin_pages/test_logged_errors.py
110 110
    error = pub.loggederror_class()
111 111
    error.summary = 'Lonely Logged Error'
112 112
    error.first_occurence_timestamp = datetime.datetime.now()
113
    error.occurences_count = 17654032
113 114
    error.store()
114 115

  
115 116
    create_superuser(pub)
......
121 122
    resp = app.get('/backoffice/studio/logged-errors/')
122 123
    assert '1-20/67' in resp.text
123 124
    assert resp.text.count('Lonely Logged Error') == 1
125
    assert '<span class="badge">17,654,032</span>' in resp.text
124 126
    assert resp.text.count('Logged Error n°') == 19
125 127
    resp = resp.click(href=r'\?offset=60')
126 128
    assert '61-67/67' in resp.text
wcs/settings.py
40 40
# If you set this to False, Django will not format dates, numbers and
41 41
# calendars according to the current locale.
42 42
USE_L10N = True
43
USE_THOUSAND_SEPARATOR = True
43 44

  
44 45
# If you set this to False, Django will not use timezone-aware datetimes.
45 46
USE_TZ = True
46
-