2727 ],
2828)
2929def test_new_repo_password_validation (qapp , qtbot , borg_json_output , first_password , second_password , validation_error ):
30- # Add new repo window
30+ # add new repo window
3131 main = qapp .main_window
3232 tab = main .repoTab
3333 tab .add_repo ()
3434 add_repo_window = tab ._window
3535 qtbot .addWidget (add_repo_window )
3636
37- # Reveal init- only widgets so password validation is active
37+ # reveal init only widgets so password validation is active
3838 add_repo_window ._set_init_widgets_visible (True )
3939 add_repo_window .passwordInput .set_validation_enabled (True )
4040
@@ -107,7 +107,7 @@ def test_repo_add_failure(qapp, qtbot, borg_json_output):
107107 add_repo_window = tab ._window
108108 qtbot .addWidget (add_repo_window )
109109
110- # Add repo with invalid URL
110+ # add repo with invalid URL
111111 qtbot .keyClicks (add_repo_window .repoURL , 'aaa' )
112112 qtbot .mouseClick (add_repo_window .saveButton , QtCore .Qt .MouseButton .LeftButton )
113113 assert add_repo_window .errorText .text ().startswith ('Please enter a valid repo URL' )
@@ -118,10 +118,10 @@ def test_repo_add_success(qapp, qtbot, mocker, borg_json_output):
118118 tab = main .repoTab
119119 tab .add_repo ()
120120 add_repo_window = tab ._window
121- test_repo_url = f'vorta-test-repo.{ uuid .uuid4 ()} .com:repo' # Random repo URL to avoid macOS keychain
121+ test_repo_url = f'vorta-test-repo.{ uuid .uuid4 ()} .com:repo' # random repo URL to avoid macOS keychain
122122 test_repo_name = 'Test Repo'
123123
124- # Enter valid repo URL, name, and password
124+ # enter valid repo URL, name, and password
125125 qtbot .keyClicks (add_repo_window .repoURL , test_repo_url )
126126 qtbot .keyClicks (add_repo_window .repoName , test_repo_name )
127127 qtbot .keyClicks (add_repo_window .passwordInput .passwordLineEdit , LONG_PASSWORD )
@@ -157,16 +157,16 @@ def test_ssh_dialog_success(qapp, qtbot, mocker, tmpdir):
157157 ssh_dialog .outputFileTextBox .setText (key_tmpfile_full )
158158 ssh_dialog .generate_key ()
159159
160- # Ensure new key file was created
160+ # Ensures new key file was created
161161 qtbot .waitUntil (lambda : ssh_dialog_closed .called , ** pytest ._wait_defaults )
162162 assert len (ssh_dir .listdir ()) == 2
163163
164- # Ensure new key is populated in SSH combobox
164+ # Ensures new key is populated in SSH combobox
165165 mocker .patch ('os.path.expanduser' , return_value = str (tmpdir ))
166166 tab .init_ssh ()
167167 assert tab .sshComboBox .count () == 2
168168
169- # Ensure valid keys were created
169+ # Ensures valid keys were created
170170 key_tmpfile_content = key_tmpfile .read ()
171171 assert key_tmpfile_content .startswith ('-----BEGIN OPENSSH PRIVATE KEY-----' )
172172 pub_tmpfile_content = pub_tmpfile .read ()
@@ -190,10 +190,10 @@ def test_ssh_dialog_failure(qapp, qtbot, mocker, monkeypatch, tmpdir):
190190 qtbot .waitUntil (lambda : failure_message .called , ** pytest ._wait_defaults )
191191 failure_message .assert_called_once ()
192192
193- # Ensure no new ney file was created
193+ # Ensures no new ney file was created
194194 assert len (ssh_dir .listdir ()) == 0
195195
196- # Ensure no new key file in combo box
196+ # Ensures no new key file in combo box
197197 mocker .patch ('os.path.expanduser' , return_value = str (tmpdir ))
198198 tab .init_ssh ()
199199 assert tab .sshComboBox .count () == 1
@@ -292,7 +292,7 @@ def test_create(qapp, borg_json_output, mocker, qtbot):
292292 "icon" : QMessageBox .Icon .Critical ,
293293 "info" : "The process running the check job got a kill signal. Try again." ,
294294 },
295- {"return_code" : 130 , "error" : "" , "icon" : None , "info" : None }, # keyboard interrupt
295+ {"return_code" : 130 , "error" : "" , "icon" : None , "info" : None },
296296 ],
297297)
298298def test_repo_check_failed_response (qapp , qtbot , mocker , response ):
0 commit comments