Commit Graph

74 Commits

Author SHA1 Message Date
Jon Pentland f1b753d088 Update tests 2022-10-18 16:33:08 +02:00
Maurits van Rees 266d87b3b9
Test-only fix: normalize white space when comparing output of comment.getText().
Needed to not fail with newer `plone.outputfilters` from this PR: https://github.com/plone/plone.outputfilters/pull/49
Comments go through the outputfilters, and the new branch calls `soup.prettify()` from `Beautifulsoup`, leading to more white space.
Sample test failures on Jenkins, see https://jenkins.plone.org/job/plip-plip-image-srcsets-3.8/5/#showFailuresLink

```
'<p>\n Go to http://www.plone.org\n</p>' != '<p>Go to http://www.plone.org</p>'
- <p>
-  Go to http://www.plone.org
? ^                          ^
+ <p>Go to http://www.plone.org</p>? ^^^                          ^^^^
- </p>

  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/home/jenkins/.buildout/eggs/cp38/plone.app.discussion-4.0.0a7-py3.8.egg/plone/app/discussion/tests/test_comment.py", line 180, in test_getText_doesnt_link
    self.assertEqual(
  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 912, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 1292, in assertMultiLineEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/srv/python3.8/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)
```
2022-06-10 13:50:16 +02:00
Jens W. Klein 19571f45ed remove six plus some bbb cleanup 2022-05-01 23:28:00 +02:00
Jens W. Klein 75c6a5dcc1 find -name "*.py" -exec pyupgrade --py3-only --py37-plus {} + 2022-05-01 23:14:41 +02:00
Jens W. Klein 34b758f2bd black 2022-05-01 23:14:09 +02:00
Jens W. Klein e72d86b985 isort 2022-05-01 23:14:00 +02:00
Godefroid Chapelle 8bc3d824e6 Fix test
after PortalTransforms uses lxml html method to serialize
(instead of xml method)
2022-03-15 12:12:39 +01:00
Philip Bauer 9e7448a049 fix test 2018-09-21 13:38:09 +02:00
hvelarde c6d1f832da Fix old-division 2018-09-18 15:13:38 +02:00
Philip Bauer 95861b28d5 fix tests with py3 2018-09-18 15:13:38 +02:00
Markus Hilbert 3c36af8ebc Fixed tests when IRichText behavior is used. 2018-07-11 12:35:46 +02:00
KUMAR AKSHAY 964dcea523 kakshay unittest (#121)
remove unittest2 dependency
2017-05-08 09:24:38 +02:00
Maurits van Rees 802e3ec04c Make comment on private content not publicly available in search results.
This is part of PloneHotfix20161129.

Updated metadata.xml version to 1000.  This leaves more room for
profile version increases in earlier releases.  We apply the rolemap
step again to avoid accidentally missing it.
2017-01-14 17:58:48 +01:00
Tom Gross 085567431f Make tests work with lxml safe html cleaner (#97)
* Make tests work with lxml safe html cleaner

* whitespace fix in test assertion
2016-05-31 11:41:34 +02:00
Gil Forcada cb1bf28c16 Cleanup
Follow https://github.com/plone/jenkins.plone.org/blob/master/docs/source/run-qa-on-package.rst
to clean up the code.
2016-02-05 09:43:42 +01:00
Gil Forcada ce48a9ed46 2 spaces before inline comment 2015-05-03 08:41:56 +02:00
Gil Forcada 4bc77a2831 Sort imports
Remove unused ones as well.
2015-05-03 08:16:41 +02:00
David Glick 8690461ffb create doc1 in the text fixture rather than in setup for each test 2015-03-09 21:51:45 -07:00
Gil Forcada 4ea41aba43 Fix tests 2015-02-16 16:35:43 +01:00
Guido A.J. Stevens a82352a36c Make comments editable 2014-05-15 17:50:32 +02:00
Jens W. Klein a145413ac2 make flake8 happy 2014-03-25 18:37:06 +01:00
tisto 9c9c2e2aaa Merge branch 'master' of git://github.com/huubbouma/plone.app.discussion into huubbouma-master
Conflicts:
	CHANGES.rst
2014-03-23 18:54:44 +01:00
Timo Stollenwerk a8dc5dd3f0 Remove test_suite functions since they are only needed for zope.testing < 3.8.0. 2013-12-19 09:54:03 +01:00
Huub Bouma fd85de9c30 Fix comments Title if utf-8 characters in author_name 2013-09-20 16:28:05 +02:00
Timo Stollenwerk a6afdf265c Pep8 2013-01-10 18:40:04 +01:00
Timo Stollenwerk 69b628c386 Pep8. 2013-01-10 18:33:46 +01:00
Timo Stollenwerk c47689af42 Fix handling of comments with invalid transforms. Write an error msg to the log and just return the untransformed text. 2012-07-12 16:03:02 +02:00
Timo Stollenwerk 702f7e1f1d Make 'text/plain' the default mime type for comments and make sure the default type is set properly when creating a new comment. 2012-07-12 16:01:07 +02:00
Timo Stollenwerk f45373b311 Test for mime type transformation from html to html added. 2012-07-12 15:54:38 +02:00
Timo Stollenwerk 0535e659ff Refactor the comment creator/author_name to comply with the Plone core convention to store the username on the creator attribute and not the fullname. 2012-07-12 15:39:27 +02:00
Paul J Stevens e31f90c440 Prune duplicated test code 2012-06-12 14:44:42 +00:00
Elizabeth Leddy 877f2d3e84 fix url redirect for content types that must have /view in url to view contents 2012-03-14 15:01:17 -07:00
tisto 81fd515455 Pep8 2012-01-14 07:53:03 +01:00
tisto a3883d7e7b Pep8 2012-01-14 07:13:39 +01:00
Timo Stollenwerk e17cfa68a1 Fix whitespace/Pep8/Pyflakes in tests. 2012-01-09 16:43:54 +01:00
Timo Stollenwerk 38b70a28e5 Use plone.app.testing in test_comment.
svn path=/plone.app.discussion/trunk/; revision=48898
2011-04-16 09:16:18 +00:00
Hanno Schlichting 9db8909ea7 Avoid using deprecated test assertions, see http://docs.python.org/dev/library/unittest.html#deprecated-aliases for the full list
svn path=/plone.app.discussion/trunk/; revision=48881
2011-04-15 16:23:38 +00:00
David Glick eb004aab44 merge r46437 and r46946 from davisagli-features: respect the per-comment mime_type setting, and use the old cooked text/html from legacy comments when migrating
svn path=/plone.app.discussion/trunk/; revision=48356
2011-04-02 19:51:37 +00:00
Timo Stollenwerk bf96d0082f Remove "Plone 3 only" code; Do not monkey patch the BAD_TYPES vocabulary or plone.app.vocabularies anymore.
svn path=/plone.app.discussion/trunk/; revision=47311
2011-02-08 09:28:51 +00:00
Maurits van Rees a2a17085a3 Nuke trailing white space
svn path=/plone.app.discussion/trunk/; revision=46366
2010-12-15 23:52:56 +00:00
David Glick 0cb75778ba make sure comments don't get indexed with their parents' UID in Plone 3. only declare dependency on plone.app.uuid in Python 2.6, since we only use it in Plone 4 currently.
svn path=/plone.app.discussion/trunk/; revision=46353
2010-12-15 20:39:55 +00:00
Timo Stollenwerk ac4a64f55d Make sure comment UIDs in the catalog are always unique. This fixes
http://dev.plone.org/plone/ticket/10652. We depend on plone.uuid and plone.app.uuid now. Refs #10652.

svn path=/plone.app.discussion/trunk/; revision=46005
2010-11-28 11:39:19 +00:00
Timo Stollenwerk b08d7ddbeb revert r46002.
svn path=/plone.app.discussion/trunk/; revision=46003
2010-11-28 10:00:31 +00:00
Timo Stollenwerk 7e39197114 hudson buildout added.
svn path=/plone.app.discussion/trunk/; revision=46002
2010-11-28 09:51:35 +00:00
Timo Stollenwerk a39ac82858 There is no need to set the comment title in the tests, since comments do not have title fields anymore.
svn path=/plone.app.discussion/trunk/; revision=44738
2010-10-31 11:09:32 +00:00
Hanno Schlichting 54bbb08c62 Whitespace removal
svn path=/plone.app.discussion/trunk/; revision=40788
2010-10-22 09:57:55 +00:00
Timo Stollenwerk f7ed357a83 Use 'comment_review_workflow' instead of 'simple_publication_workflow' for testing.
svn path=/plone.app.discussion/trunk/; revision=40571
2010-10-08 11:03:14 +00:00
Timo Stollenwerk 0ee649fb6c Functional test for special characters added. Remove unnecessary decode statement from creator.
svn path=/plone.app.discussion/trunk/; revision=40502
2010-10-04 13:48:27 +00:00
Timo Stollenwerk e0055d0ba7 Make sure comment titles work with special characters as well.
svn path=/plone.app.discussion/trunk/; revision=40486
2010-10-02 18:16:49 +00:00
Timo Stollenwerk 22db0b1c78 Fix comment title for anonymous commentators that do not provide a name.
svn path=/plone.app.discussion/trunk/; revision=40435
2010-09-29 10:52:11 +00:00