trustcafe-api-wrapper/tests/wrappers/trust.py
2026-04-07 21:54:52 +01:00

15 lines
No EOL
630 B
Python

import unittest
from trustcafeapiwrapper.wrappers.trust.trust import trust
class TestTrustCreateOrUpdate(unittest.TestCase):
def test_trust(self):
trustLevel = 100
userprofile_path = '/user/johndoe'
result = trust(trustLevel, userprofile_path)
self.assertIsInstance(result, dict)
self.assertIn("job_function", result)
self.assertIn("payload", result)
self.assertEqual(result["job_function"], "trust.createorupdate")
self.assertEqual(result["payload"]["trustLevel"], trustLevel)
self.assertEqual(result["payload"]["parentSlug"], "johndoe")