Skip to content

Commit

Permalink
modify the code for the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadrezaPourreza committed Apr 2, 2024
1 parent 0246975 commit 2e4e7bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataherald/sql_database/models/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def set_dialect(cls, input_string):
def connection_uri_format(cls, value: str, values):
fernet_encrypt = FernetEncrypt()
try:
decrypted_value = fernet_encrypt.decrypt(value)
dialect_prefix = cls.validate_uri(decrypted_value)
decrypted_connection_uri = fernet_encrypt.decrypt(value)
dialect_prefix = cls.validate_uri(decrypted_connection_uri)
except Exception:
dialect_prefix = cls.validate_uri(value)
value = fernet_encrypt.encrypt(value)
Expand Down
1 change: 1 addition & 0 deletions dataherald/tests/db/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(self, system: System):
{
"_id": ObjectId("64dfa0e103f5134086f7090c"),
"alias": "alias",
"dialect": "dialect",
"use_ssh": False,
"connection_uri": "gAAAAABkwD9Y9EpBxF1hRxhovjvedX1TeDNu-WaGqDebk_CJnpGjRlpXzDOl_puehMSbz9KDQ6OqPepl8XQpD0EchiV7he4j5tEXYE33eak87iORA7s8ko0=", # noqa: E501
"ssh_settings": None,
Expand Down

0 comments on commit 2e4e7bc

Please sign in to comment.