diff --git a/cps/editbooks.py b/cps/editbooks.py index d8e16e4c..e217ebd9 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -468,7 +468,7 @@ def edit_book_comments(comments, book): comments = clean_html(comments) if len(book.comments): if book.comments[0].text != comments: - book.comments[0].text = clean_html(comments) + book.comments[0].text = comments modif_date = True else: if comments: diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 101769f7..5175c380 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2021-07-30 11:44:06
+Start Time: 2021-08-27 20:45:00
Stop Time: 2021-07-30 15:14:26
+Stop Time: 2021-08-28 00:16:11
Duration: 2h 45 min
+Duration: 2h 48 min
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 202, in test_convert_email + self.assertEqual(ret[-2]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 249, in test_convert_failed_and_email + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 337, in test_convert_only + self.assertEqual(ret_orig[-6]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 164, in test_convert_parameter + self.assertEqual(1, task_len) +AssertionError: 1 != 0+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 141, in test_convert_wrong_excecutable + self.assertEqual(2, task_len) +AssertionError: 2 != 0+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 457, in test_email_failed + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 416, in test_email_only + self.assertEqual(ret[-1]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 500, in test_ssl_smtp_setup_error + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 480, in test_starttls_smtp_setup_error + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 193, in test_convert_email
+ self.assertTrue("Email" in ret[-1]['task'])
+IndexError: list index out of range
+ Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 234, in test_convert_failed_and_email + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 324, in test_convert_only + self.assertEqual(ret[-6]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 157, in test_convert_parameter + self.assertEqual(task_len, 1) +AssertionError: 0 != 1+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 430, in test_email_failed + self.assertEqual(ret[-1]['result'], 'Failed') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 389, in test_email_only + self.assertEqual(ret[-1]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_kepubify.py", line 126, in test_convert_only + self.assertEqual(ret[-1]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_kepubify_gdrive.py", line 174, in test_convert_only + self.assertEqual(ret[-1]['result'], 'Finished') +IndexError: list index out of range+
Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 82, in frame
+ frame_reference = self._driver.find_element(By.ID, frame_reference)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
+ return self.execute(Command.FIND_ELEMENT, {
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
+ self.error_handler.check_response(response)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
+ raise exception_class(message, screen, stacktrace)
+selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="description_ifr"]
-
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 85, in frame
+ frame_reference = self._driver.find_element(By.NAME, frame_reference)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
+ return self.execute(Command.FIND_ELEMENT, {
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
+ self.error_handler.check_response(response)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
+ raise exception_class(message, screen, stacktrace)
+selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="description_ifr"]
+
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 673, in test_xss_comment_edit
+ self.edit_book(1, content={'description': ''})
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 1608, in edit_book
+ cls.driver.switch_to.frame("description_ifr")
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/switch_to.py", line 87, in frame
+ raise NoSuchFrameException(frame_reference)
+selenium.common.exceptions.NoSuchFrameException: Message: description_ifr
+
+
+
+
+
+
+
+
+
+
+
+ TestEditAdditionalBooks - test_xss_custom_comment_edit
+
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 687, in test_xss_custom_comment_edit
+ self.edit_book(1, custom_content={'Custom Comment 人物': ''})
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 1634, in edit_book
+ submit.click()
+AttributeError: 'bool' object has no attribute 'click'
+
+
+
+
+
+
+
+
+
+
+
TestEditBooks
35
- 34
- 0
+ 33
+ 1
0
1
@@ -859,11 +1291,32 @@
-
+
TestEditBooks - test_edit_comments
- PASS
+
+
+ FAIL
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_books.py", line 428, in test_edit_comments
+ self.assertEqual('', values['comment'])
+AssertionError: '' != 'bogomirä 人物'
++ bogomirä 人物
+
+
+
+
+
@@ -1270,11 +1723,11 @@
-
+
TestEditBooksOnGdrive
20
- 20
- 0
+ 19
+ 1
0
0
@@ -1311,11 +1764,32 @@
-
+
TestEditBooksOnGdrive - test_edit_comments
- PASS
+
+
+ FAIL
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 639, in test_edit_comments
+ self.assertEqual('', values['comment'])
+AssertionError: '' != 'bogomirä 人物'
++ bogomirä 人物
+
+
+
+
+
@@ -1465,12 +1939,12 @@
-
+
TestSTARTTLS
3
- 3
- 0
+ 1
0
+ 2
0
Detail
@@ -1479,20 +1953,60 @@
-
+
TestSTARTTLS - test_STARTTLS
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_STARTTLS.py", line 79, in test_STARTTLS
+ self.assertEqual(ret[-1]['result'], 'Finished')
+IndexError: list index out of range
+
+
+
+
+
-
+
TestSTARTTLS - test_STARTTLS_SSL_setup_error
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_STARTTLS.py", line 100, in test_STARTTLS_SSL_setup_error
+ self.assertEqual(ret[-1]['result'], 'Failed')
+IndexError: list index out of range
+
+
+
+
+
@@ -1507,12 +2021,12 @@
-
+
TestSSL
6
- 6
- 0
+ 1
0
+ 5
0
Detail
@@ -1521,20 +2035,60 @@
-
+
TestSSL - test_SSL_None_setup_error
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 122, in test_SSL_None_setup_error
+ self.assertEqual('Failed', ret[-1]['result'])
+IndexError: list index out of range
+
+
+
+
+
-
+
TestSSL - test_SSL_STARTTLS_setup_error
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 101, in test_SSL_STARTTLS_setup_error
+ self.assertEqual(ret[-1]['result'], 'Failed')
+IndexError: list index out of range
+
+
+
+
+
@@ -1548,29 +2102,159 @@
-
+
TestSSL - test_SSL_non_admin_user
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 195, in test_SSL_non_admin_user
+ self.assertEqual(ret[-1]['result'], 'Finished')
+IndexError: list index out of range
+
+
+
+
+
-
+
TestSSL - test_SSL_only
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 64, in test_SSL_only
+ self.setup_server(False, {'mail_use_ssl': 'SSL/TLS'})
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 674, in setup_server
+ select = Select(cls.driver.find_element_by_id(key))
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id
+ return self.find_element(by=By.ID, value=id_)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
+ return self.execute(Command.FIND_ELEMENT, {
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
+ self.error_handler.check_response(response)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
+ raise exception_class(message, screen, stacktrace)
+selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="mail_use_ssl"]
+
+
+
+
+
-
+
TestSSL - test_email_limit
- PASS
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 135, in test_email_limit
+ self.fill_basic_config({'config_uploading': 1})
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 342, in fill_basic_config
+ cls._fill_basic_config(elements)
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 252, in _fill_basic_config
+ WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port")))
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/support/wait.py", line 80, in until
+ raise TimeoutException(message, screen, stacktrace)
+selenium.common.exceptions.TimeoutException: Message:
+
+
+
+
+
+
+
+
+
+
+
+ _ErrorHolder
+ 1
+ 0
+ 0
+ 1
+ 0
+
+ Detail
+
+
+
+
+
+
+
+ tearDownClass (test_email_ssl)
+
+
+
+ ERROR
+
+
+
+
+
+ Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 52, in tearDownClass
+ cls.stop_calibre_web()
+ File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 430, in stop_calibre_web
+ cls.driver.find_element_by_id('admin_stop').click()
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id
+ return self.find_element(by=By.ID, value=id_)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
+ return self.execute(Command.FIND_ELEMENT, {
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
+ self.error_handler.check_response(response)
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
+ raise exception_class(message, screen, stacktrace)
+selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"]
+
+
+
+
+
@@ -1584,13 +2268,13 @@
0
0
- Detail
+ Detail