8000 Fixes test suite (#6688) · django-cms/django-cms@006367b · GitHub
[go: up one dir, main page]

Skip to content

Commit 006367b

Browse files
authored
Fixes test suite (#6688)
* add information for testing * fix tests * updated CHANGELOG * update * 1.8.5 * fix tests locally * update text
1 parent b810dd4 commit 006367b

File tree

11 files changed

+28
-17
lines changed

11 files changed

+28
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dist
2323
.project
2424
.coverage
2525
.pydevproject
26+
.vscode
2627
.settings
2728
/*.egg-info/
2829
/*.egg/

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,3 @@ notifications:
146146
irc:
147147
- irc.freenode.org#django-cms
148148
- irc.freenode.org#django-cms-sprint
149-
webhooks:
150-
- http://addons.us-iad-rs.aldryn.io/en/travis-endpoint/

CHANGELOG.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
=== 3.7.0 (unreleased) ===
22

33
* Introduced Django 2.2 support.
4+
* Fixed test suite.
45

56

67
=== 3.6.0 (2019-01-29) ===

cms/tests/test_apphooks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import sys
3+
import mock
34

45
from django.contrib.admin.models import CHANGE, LogEntry
56
from django.contrib.auth import get_user_model
@@ -855,7 +856,8 @@ def test_get_menus(self):
855856

856857
request = self.get_request('/')
857858
renderer = menu_pool.get_renderer(request)
858-
nodes = renderer.get_nodes()
859+
with mock.patch("menus.menu_pool.logger.error"):
860+
nodes = renderer.get_nodes()
859861
nodes_urls = [node.url for node in nodes]
860862
self.assertTrue(reverse('sample-account') in nodes_urls)
861863
self.assertFalse('/en/child_page/page2/' in nodes_urls)

cms/tests/test_docs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import sys
88

99
from django.utils.six.moves import StringIO
10-
from sphinx.application import Sphinx, SphinxWarning
10+
from sphinx.application import Sphinx
11+
from sphinx.errors import SphinxWarning
1112

1213
try:
1314
import enchant

docs/contributing/testing.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ We are working to improve the performance and reliability of our test suite. We'
6565
problems, but need feedback from people using a wide range of systems and configurations in order
6666
to benefit from their experience.
6767

68-
Please use the open issue `#3684 Test suite is error-prone
69-
<https://github.com/divio/django-cms/issues/3684>`_ on our GitHub repository to report such
70-
problems.
68+
Please report any issues on our `GitHub repository <https://github.com/divio/django-cms/issues>`_.
7169

7270
If you can help *improve* the test suite, your input will be especially valuable.
7371

@@ -96,6 +94,14 @@ when the entire suite is run. To work around this you can invoke the test class
9694
and it should then run without errors.
9795

9896

97+
``ERROR: zlib is required unless explicitly disabled using --disable-zlib, aborting``
98+
------------------------------------------------------------------------------------------
99+
100+
If you run into that issue, make sure to install zlib using Homebrew::
101+
102+
brew install libjpeg zlib && brew link --force zlib
103+
104+
99105
Advanced testing options
100106
========================
101107

docs/reference/api_references.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,33 +221,34 @@ add a text plugin with the content ``'hello world'``. This is done in English::
221221
cms.constants
222222
*************
223223

224-
.. module:: cms.constants
224+
.. module:: cms.constants
225225

226-
.. data:: TEMPLATE_INHERITANCE_MAGIC
226+
.. data:: TEMPLATE_INHERITANCE_MAGIC
227227

228228
The token used to identify when a user selects "inherit" as template for a
229229
page.
230230

231-
.. data:: LEFT
231+
.. data:: LEFT
232232

233233
Used as a position indicator in the toolbar.
234234

235-
.. data:: RIGHT
235+
.. data:: RIGHT
236236

237237
Used as a position indicator in the toolbar.
238238

239-
.. data:: REFRESH
239+
.. data:: REFRESH
240240

241241
Constant used by the toolbar.
242242

243-
.. data:: EXPIRE_NOW
243+
.. data:: EXPIRE_NOW
244244

245245
Constant of 0 (zero) used for cache control headers
246246

247-
.. data:: MAX_EXPIRATION_TTL
247+
.. data:: MAX_EXPIRATION_TTL
248248

249249
Constant of 31536000 or 365 days in seconds used for cache control headers
250250

251+
251252
************
252253
cms.app_base
253254
************

docs/reference/toolbar.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ django CMS constants used in toolbars
380380
*************************************
381381

382382
.. module:: cms.constants
383+
:noindex:
383384

384385
.. data:: REFRESH_PAGE
385386

docs/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
-f http://simple.crate.io/
21
MarkupSafe==0.23
32
Pygments==2.0.2
43
sphinx

docs/upgrade/3.7.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Improvements and new features
1515
=============================
1616

1717
* introduced support for Django 2.2
18+
* Fixed test suite.
1819

1920

2021
*********************

0 commit comments

Comments
 (0)
0