def test_initialization_with_none_as_schema_param(self):
     request_context = RequestContext(None, None)
     self._initialize_edit_request.schema_name = None
     errormsg = 'Parameter schema_name contains a None, empty, or whitespace string'
     self.assert_exception_on_method_call(
         ValueError, errormsg, self._service_under_test._edit_initialize,
         request_context, self._initialize_edit_request)
    def test_initialization_with_empty_object_type(self):
        request_context = RequestContext(None, None)
        self._initialize_edit_request.object_type = ' '
        errormsg = 'Parameter object_type contains a None, empty, or whitespace string'

        self.assert_exception_on_method_call(
            ValueError, errormsg, self._service_under_test._edit_initialize,
            request_context, self._initialize_edit_request)
 def test_initialization(self, mockdataeditorsession):
     queue = Queue()
     message = JSONRPCMessage.from_dictionary({
         'id': '123',
         'method': 'edit/initialize',
         'params': {}
     })
     request_context = RequestContext(message, queue)
     self._service_under_test._edit_initialize(
         request_context, self._initialize_edit_request)
     mockdataeditorsession.assert_called()