Exemplo n.º 1
0
 def test_from_requirements_POST(self):
     from cheeseprism.views import from_requirements
     context, request = self.base_cr
     flash = request.session.flash = Mock('flash')
     notify = request.registry.notify = Mock('notify')
     request.method = 'POST'
     reqfile = here / 'req-1.txt'
     request.POST['req_file'] = FakeFS(reqfile, body=reqfile.text())
     with mock_downloader():
         out = from_requirements(context, request)
         assert out
         assert flash.called
         assert notify.called
Exemplo n.º 2
0
 def test_from_requirements_POST(self):
     from cheeseprism.views import from_requirements
     context, request = self.base_cr
     flash = request.session.flash = Mock('flash')
     notify = request.registry.notify = Mock('notify')
     request.method = 'POST'
     reqfile = here / 'req-1.txt'
     request.POST['req_file'] = FakeFS(reqfile, body=reqfile.text())
     with mock_downloader():
         out = from_requirements(context, request)
         assert out
         assert flash.called
         assert notify.called
Exemplo n.º 3
0
 def test_from_requirements_GET(self):
     from cheeseprism.views import from_requirements
     context, request = self.base_cr
     assert from_requirements(context, request) == {}
Exemplo n.º 4
0
    def test_from_requirements_GET(self):
        from cheeseprism.views import from_requirements

        context, request = self.base_cr
        assert from_requirements(context, request) == {}