diff --git a/castle/test/commands/authenticate_test.py b/castle/test/commands/authenticate_test.py index 47fe213..f7ca7ec 100644 --- a/castle/test/commands/authenticate_test.py +++ b/castle/test/commands/authenticate_test.py @@ -89,3 +89,17 @@ def test_build_user_traits_allowed(self): self.assertEqual(CommandsAuthenticate( context).build(options), expected) + + def test_build_risk_policy_allowed(self): + context = {} + risk_policy = { + 'id': 'q-rbeMzBTdW2Fd09sbz55A', + 'revision_id': 'pke4zqO2TnqVr-NHJOAHEg', + 'name': 'Block Users from X', + 'type': 'bot' + } + + options = default_options_plus(risk_policy=risk_policy) + expected = default_command_with_data(**options) + self.assertEqual(CommandsAuthenticate( + context).build(options), expected)