1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-21 14:08:52 +02:00
Files
github.com_openSUSE_osc/tests/test_gitea_api_ssh_key.py

21 lines
492 B
Python

import unittest
from osc.gitea_api import SSHKey
class TestGiteaApiSSHKey(unittest.TestCase):
def test_object(self):
data = {
"id": 1,
"key": "ssh-rsa ZXhhbXBsZS1zc2gta2V5Cg==",
"title": "key title",
}
obj = SSHKey(data)
self.assertEqual(obj.id, 1)
self.assertEqual(obj.key, "ssh-rsa ZXhhbXBsZS1zc2gta2V5Cg==")
self.assertEqual(obj.title, "key title")
if __name__ == "__main__":
unittest.main()