Пример #1
0
    def setUp(self):
        super(TestDeletePreprintProvider, self).setUp()

        self.user = AuthUserFactory()
        self.preprint_provider = PreprintProviderFactory()

        self.request = RequestFactory().get('/fake_path')
        self.view = views.DeletePreprintProvider()
        self.view = setup_user_view(self.view, self.request, user=self.user)

        self.view.kwargs = {'preprint_provider_id': self.preprint_provider.id}
Пример #2
0
 def view(self, req, provider):
     view = views.DeletePreprintProvider()
     view = setup_view(view, req)
     view.kwargs = {'preprint_provider_id': provider.id}
     return view