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")