

def test_upload_duplicate(self):
    ' Uploading a duplicate package returns 400 '
    self.params = {
        ':action': 'file_upload',
    }
    (name, version, content) = ('foo', '1.2', MagicMock())
    content.filename = 'foo-1.2.tar.gz'
    self.db.upload(content.filename, content, name)
    response = upload(self.request, content, content, version)
    self.assertEqual(response.status_code, 400)

dataset/ETHPy150Open mathcamp/pypicloud/tests/test_simple.py TestSimple.test_upload_duplicate/VarMisuse@74/115 `name`->`content`