(self, request)
ensures request is well formed
ensures request is well formed
ensures request is well formed
def invalid(self, request):
        """
        ensures request is well formed
        """
        allowed_backends = [path for path, name in app_settings.BACKENDS]
        required_params = [
            ('secret', None),
            ('name', None),
            ('mac_address', None),
            ('backend', allowed_backends),
        ]
        # valid required params or forbid
        for key, value in required_params:
            invalid_response = forbid_unallowed(request, 'POST', key, value)
            if invalid_response:
                return invalid_response
def invalid ( self , request ) : allowed_backends = [ path for path , name in app_settings . BACKENDS ] required_params = [ ( 'secret' , None ) , ( 'name' , None ) , ( 'mac_address' , None ) , ( 'backend' , allowed_backends ) , ] # valid required params or forbid for key , value in required_params : invalid_response = forbid_unallowed ( request , 'POST' , key , value ) if invalid_response : return invalid_response