Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
server-side-backups-client
Commits
adcd5cd3
Verified
Commit
adcd5cd3
authored
Jan 12, 2018
by
Štěpán Henek
🐻
Browse files
TestGetPasswd removed (api changed)
parent
639dcaa6
Pipeline
#31632
passed with stage
in 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/test_ssbackups.py
View file @
adcd5cd3
...
...
@@ -4,12 +4,11 @@ There are tests
1) on structure of ClientException
2) on validate type function type_target_path
3) on validate type function type_filepath
4) on returned password from get_password function
5) on removing files when remove_encrypted_backup was called
6) on raising SSBackupsException exception when encrypt_backups was called
7) on raising SSBackupsException exception when decrypt_backups was called
8) on raising SSBackupsException exception when get_registration_code was called
9) on raising SSBackupsException exception when call_rest_api was called
4) on removing files when remove_encrypted_backup was called
5) on raising SSBackupsException exception when encrypt_backups was called
6) on raising SSBackupsException exception when decrypt_backups was called
7) on raising SSBackupsException exception when get_registration_code was called
8) on raising SSBackupsException exception when call_rest_api was called
"""
import
unittest
...
...
@@ -17,7 +16,7 @@ import json
from
subprocess
import
CalledProcessError
from
mock
import
patch
from
ssbackups
import
SSBackupsException
,
type_target_path
,
type_filepath
,
get_password
,
\
from
ssbackups
import
SSBackupsException
,
type_target_path
,
type_filepath
,
\
remove_encrypted_backup
,
encrypt_backup
,
decrypt_backup
,
get_registration_code
,
call_rest_api
...
...
@@ -114,21 +113,6 @@ class TestTypeFilePath(unittest.TestCase):
)
class
TestGetPasswd
(
unittest
.
TestCase
):
"""Some tests that get_password returns password as it was comes in
"""
def
test_get_password_on_receive_passwd
(
self
):
"""
get_passwd should returns what it received - password
:return:
"""
passwd
=
'secret'
self
.
assertTrue
(
passwd
==
get_password
(
passwd
)
)
class
TestRemoveEncryptedBackup
(
unittest
.
TestCase
):
"""Some tests to assure that os.remove was called to remove backup from disk
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment