Example #1
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(
                     'everest.tests.complete_app:configure_no_rdb.zcml')
     self.config.add_view(context=get_collection_class(IMyEntity),
                          view=ExceptionPostCollectionView,
                          request_method=RequestMethods.POST)
Example #2
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(
                     'everest.tests.complete_app:configure_no_rdb.zcml')
     self.config.add_view(context=get_collection_class(IMyEntity),
                          view=ExceptionPostCollectionView,
                          request_method='POST')
Example #3
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml('everest.tests.complete_app:configure_rpr.zcml')
     self.config.add_renderer('csv', RendererFactory)
     self.config.add_view(context=get_collection_class(IMyEntity),
                          view=GetCollectionView,
                          renderer='csv',
                          request_method=RequestMethods.GET,
                          custom_predicates=(accept_csv_only,))
Example #4
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml('everest.tests.complete_app:configure_no_rdb.zcml')
     self.config.add_view(context=IService,
                          view=public_view,
                          name='public',
                          request_method='GET')
     fn = resource_filename('everest.tests.complete_app', 'data/original')
     self.config.registry.settings['public_dir'] = fn
Example #5
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml('everest.tests.complete_app:configure_rpr.zcml')
     self.config.add_renderer('csv', RendererFactory)
     self.config.add_view(context=get_collection_class(IMyEntity),
                          view=GetCollectionView,
                          renderer='csv',
                          request_method='GET',
                          custom_predicates=(accept_csv_only,))
Example #6
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(
                     'everest.tests.complete_app:configure_no_rdb.zcml')
     self.config.add_member_view(IMyEntity,
                                 view=ExceptionPutMemberView,
                                 request_method=RequestMethods.PUT)
     self.config.add_collection_view(IMyEntity,
                                     view=ExceptionPostCollectionView,
                                     request_method=RequestMethods.POST)
Example #7
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(
                     'everest.tests.complete_app:configure_no_rdb.zcml')
     self.config.add_member_view(IMyEntity,
                                 view=ExceptionPutMemberView,
                                 request_method='PUT')
     self.config.add_collection_view(IMyEntity,
                                     view=ExceptionPostCollectionView,
                                     request_method='POST')
Example #8
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(self.config_file_name)
     # We have to call this again to initialize the newly created SYSTEM
     # repo.
     repo_mgr = get_repository_manager()
     repo_mgr.initialize_all()
     self.config.add_collection_view(FooCollection,
                                     view=UserMessagePostCollectionView,
                                     request_method=RequestMethods.POST)
     self.config.add_member_view(FooMember,
                                 view=UserMessagePutMemberView,
                                 request_method=RequestMethods.PUT)
Example #9
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(self.config_file_name)
     # We have to call this again to initialize the newly created SYSTEM
     # repo.
     repo_mgr = get_repository_manager()
     repo_mgr.initialize_all()
     self.config.add_collection_view(FooCollection,
                                     view=UserMessagePostCollectionView,
                                     request_method='POST')
     self.config.add_member_view(FooMember,
                                 view=UserMessagePutMemberView,
                                 request_method='PUT')
Example #10
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml('everest.tests.complete_app:configure_rpr.zcml')
     self.config.add_resource_view(IMyEntity,
                                   renderer='csv',
                                   request_method='GET')
     self.config.add_member_view(IMyEntity,
                                 renderer='csv',
                                 request_method='PUT')
     self.config.add_collection_view(IMyEntity,
                                     renderer='csv',
                                     request_method='POST')
     self.config.add_collection_view(IMyEntityChild,
                                     renderer='csv',
                                     request_method='POST')
     self.config.add_member_view(IMyEntity,
                                 renderer='csv',
                                 request_method='DELETE')
Example #11
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Example #12
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Example #13
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(self.views_config_file_name)
     coll = get_root_collection(IFoo)
     coll.create_member(FooEntity(id=0))
     transaction.commit()
Example #14
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
     self.config.load_zcml(self.views_config_file_name)
     coll = get_root_collection(IFoo)
     coll.create_member(FooEntity(id=0))
     transaction.commit()