mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-21 14:08:52 +02:00
21 lines
492 B
Python
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()
|