예제 #1
0
파일: test_views.py 프로젝트: b8va/everest
 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
파일: test_views.py 프로젝트: b8va/everest
 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
파일: test_views.py 프로젝트: b8va/everest
 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
파일: test_views.py 프로젝트: b8va/everest
 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 set_up(self):
     FunctionalTestCase.set_up(self)
예제 #12
0
파일: testing.py 프로젝트: helixyte/TheLMA
 def set_up(self):
     FunctionalTestCase.set_up(self)
예제 #13
0
파일: test_views.py 프로젝트: b8va/everest
 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()
예제 #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()