1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00
github.com_openSUSE_osc/tests/test_credentials.py

18 lines
554 B
Python
Raw Normal View History

2024-01-22 16:28:28 +01:00
import unittest
import osc.conf
from osc.credentials import ObfuscatedConfigFileCredentialsManager
class TestObfuscatedConfigFileCredentialsManager(unittest.TestCase):
def test_decode_password(self):
# obfuscated "opensuse"
password_str = "QlpoOTFBWSZTWeTSblkAAAGBgAIBygAgADDACGNEHxaYXckU4UJDk0m5ZA=="
password = osc.conf.Password(password_str)
decoded = ObfuscatedConfigFileCredentialsManager.decode_password(password)
self.assertEqual(decoded, "opensuse")
if __name__ == "__main__":
unittest.main()