def test_upload(self):
        self.params = {
            ':action': 'file_upload',
        }
        name, version, content = 'foo', 'bar', MagicMock()
        content.filename = 'foo-1.2.tar.gz'
        pkg = upload(self.request, content, name, version)

        self.assertEquals(pkg, self.request.db.packages[content.filename])
Upload endpoint returns the result of api call
dataset/ETHPy150Open mathcamp/pypicloud/tests/test_simple.py/TestSimple.test_upload