Compare commits

..

2 Commits

Author SHA1 Message Date
hurui200320 046cfea8f6 test
Unit test coverage / pytest (push) Has been cancelled
Unit test coverage / pytest (pull_request) Has been cancelled
CI for pypl publish / publish-lib (push) Successful in 1m8s
2025-04-30 11:33:14 +08:00
hurui200320 472ae0c2f1 ci(forgejo): move pipeline to forgejo
Unit test coverage / pytest (push) Failing after 1m7s
Unit test coverage / pytest (pull_request) Failing after 1m6s
ISSUES CLOSED: clevermicro/amq-adapter-python#8
2025-04-30 11:33:06 +08:00
@@ -222,25 +222,6 @@ class TestCleverThisServiceAdapter(unittest.TestCase):
with self.assertRaises(NotImplementedError): with self.assertRaises(NotImplementedError):
await self.adapter.delete(mock_message, None) await self.adapter.delete(mock_message, None)
def test_require_authenticated_user_config(self):
# Test different config values for require_authenticated_user
test_cases = [
("True", True),
("False", False),
("", True), # Default when empty
("invalid", True), # Default when invalid
]
for config_value, expected in test_cases:
with self.subTest(config_value=config_value):
mock_config = AMQConfiguration("./application.properties.local")
mock_config.dispatch.service_host = "testhost"
mock_config.dispatch.service_port = 8080
mock_config.amq_adapter.require_authenticated_user = config_value
adapter = CleverThisServiceAdapter(mock_config)
self.assertEqual(adapter.require_authenticated_user, expected)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()