def test_validate_action_invalid(self):
     obj = ACLEncoderMixin()
     with pytest.raises(ValueError) as ex:
         obj._validate_action('foobarbaz')
     expected = 'Invalid ACL action value: foobarbaz. Valid values are:'
     assert expected in str(ex.value)
 def test_validate_action_invalid(self):
     obj = ACLEncoderMixin()
     with pytest.raises(ValueError) as ex:
         obj._validate_action('foobarbaz')
     expected = 'Invalid ACL action value: foobarbaz. Valid values are:'
     assert expected in str(ex.value)
 def test_validate_action_valid(self):
     obj = ACLEncoderMixin()
     try:
         obj._validate_action(list(obj.ACTIONS.values())[0])
     except ValueError:
         raise Exception('Unexpected error')
 def test_validate_action_valid(self):
     obj = ACLEncoderMixin()
     try:
         obj._validate_action(list(obj.ACTIONS.values())[0])
     except ValueError:
         raise Exception('Unexpected error')