Пример #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)
Пример #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')
Пример #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,))
Пример #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
Пример #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,))
Пример #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)
Пример #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')
Пример #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)
Пример #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')
Пример #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')
Пример #11
0
 def tear_down(self):
     transaction.abort()
     Session.remove()
     FunctionalTestCase.tear_down(self)
Пример #12
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Пример #13
0
 def tear_down(self):
     transaction.abort()
     Session.remove()
     FunctionalTestCase.tear_down(self)
Пример #14
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Пример #15
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()
Пример #16
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()