From c85cfa90a4a71a3701f56dd36023b6bc16efda66 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Tue, 18 May 2021 21:15:46 +0200 Subject: [PATCH] Update testresults on windows Added encoding on fb2 upload --- cps/admin.py | 9 +- cps/fb2.py | 2 +- test/Calibre-Web TestSummary_Windows.html | 3929 ++++++++++++++------- 3 files changed, 2733 insertions(+), 1207 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 1df1e8cc..453e4b66 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -985,11 +985,14 @@ def _config_string(to_save, x): def _configuration_gdrive_helper(to_save): + gdrive_error = None + gdrive_secrets = {} + if not os.path.isfile(gdriveutils.SETTINGS_YAML): config.config_use_google_drive = False - gdrive_secrets = {} - gdrive_error = gdriveutils.get_error_text(gdrive_secrets) + if gdrive_support: + gdrive_error = gdriveutils.get_error_text(gdrive_secrets) if "config_use_google_drive" in to_save and not config.config_use_google_drive and not gdrive_error: with open(gdriveutils.CLIENT_SECRETS, 'r') as settings: gdrive_secrets = json.load(settings)['web'] @@ -1254,7 +1257,7 @@ def _configuration_result(error_flash=None, gdrive_error=None, configured=True): gdrivefolders = [] if gdrive_error is None: gdrive_error = gdriveutils.get_error_text() - if gdrive_error: + if gdrive_error and gdrive_support: log.error(gdrive_error) gdrive_error = _(gdrive_error) else: diff --git a/cps/fb2.py b/cps/fb2.py index d7b03d5b..af4a29a7 100644 --- a/cps/fb2.py +++ b/cps/fb2.py @@ -29,7 +29,7 @@ def get_fb2_info(tmp_file_path, original_file_extension): 'l': 'http://www.w3.org/1999/xlink', } - fb2_file = open(tmp_file_path) + fb2_file = open(tmp_file_path, encoding="utf-8") tree = etree.fromstring(fb2_file.read().encode()) authors = tree.xpath('/fb:FictionBook/fb:description/fb:title-info/fb:author', namespaces=ns) diff --git a/test/Calibre-Web TestSummary_Windows.html b/test/Calibre-Web TestSummary_Windows.html index eadf672d..6668632d 100644 --- a/test/Calibre-Web TestSummary_Windows.html +++ b/test/Calibre-Web TestSummary_Windows.html @@ -37,20 +37,20 @@
-

Start Time: 2021-01-02 08:38:57

+

Start Time: 2021-05-18 17:33:17

-

Stop Time: 2021-01-02 12:04:50

+

Stop Time: 2021-05-18 20:37:38

-

Duration: 2h 58 min

+

Duration: 2h 35 min

@@ -234,13 +234,13 @@ - + TestCli 8 - 7 + 8 + 0 0 0 - 1 Detail @@ -268,7 +268,7 @@ -
TestCli - test_cli_SSL_files
+
TestCli - test_change_password
PASS @@ -277,7 +277,7 @@ -
TestCli - test_cli_different_folder
+
TestCli - test_cli_SSL_files
PASS @@ -286,35 +286,18 @@ -
TestCli - test_cli_different_settings_database
+
TestCli - test_cli_different_folder
PASS - + -
TestCli - test_cli_gdrive_location
- - -
- SKIP -
- - - +
TestCli - test_cli_different_settings_database
+ PASS @@ -338,6 +321,39 @@ + + TestCliGdrivedb + 2 + 2 + 0 + 0 + 0 + + Detail + + + + + + + +
TestCliGdrivedb - test_cli_gdrive_location
+ + PASS + + + + + + +
TestCliGdrivedb - test_gdrive_db_nonwrite
+ + PASS + + + + + TestCoverEditBooks 1 @@ -346,13 +362,13 @@ 0 0 - Detail + Detail - +
TestCoverEditBooks - test_upload_jpg
@@ -370,13 +386,13 @@ 0 0 - Detail + Detail - +
TestDeleteDatabase - test_delete_books_in_database
@@ -386,158 +402,338 @@ - + TestEbookConvertCalibre 11 + 0 + 0 + 0 11 - 0 - 0 - 0 - Detail + Detail - +
TestEbookConvertCalibre - test_convert_deactivate
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_convert_email
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_convert_failed_and_email
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_convert_only
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_convert_parameter
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_convert_wrong_excecutable
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_email_failed
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_email_only
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_kindle_send_not_configured
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_ssl_smtp_setup_error
- PASS + +
+ SKIP +
+ + + + - +
TestEbookConvertCalibre - test_starttls_smtp_setup_error
- PASS + +
+ SKIP +
+ + + + - - _ErrorHolder - 3 + + TestEbookConvertCalibreGDrive + 6 0 0 - 3 0 + 6 - Detail + Detail - + -
setUpClass (test_ebook_convert_gdrive)
+
TestEbookConvertCalibreGDrive - test_convert_email
- ERROR + SKIP
-