Esempio n. 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)
Esempio n. 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')
Esempio n. 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,))
Esempio n. 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
Esempio n. 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,))
Esempio n. 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)
Esempio n. 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')
Esempio n. 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)
Esempio n. 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')
Esempio n. 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')
Esempio n. 11
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Esempio n. 12
0
 def set_up(self):
     FunctionalTestCase.set_up(self)
Esempio n. 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()
Esempio n. 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()