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
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
def test_from_requirements_GET(self): from cheeseprism.views import from_requirements context, request = self.base_cr assert from_requirements(context, request) == {}
def test_from_requirements_GET(self): from cheeseprism.views import from_requirements context, request = self.base_cr assert from_requirements(context, request) == {}