

def test_upload(self):
    ' Upload endpoint returns the result of api call '
    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])

dataset/ETHPy150Open mathcamp/pypicloud/tests/test_simple.py TestSimple.test_upload/original