more s3 tests for posting

This commit is contained in:
Steve Pulec 2013-05-17 19:41:39 -04:00
commit 3bc975188f
3 changed files with 25 additions and 9 deletions

View file

@ -33,3 +33,18 @@ def test_s3_server_bucket_create():
res = test_client.get('/bar', 'http://foobar.localhost:5000/')
res.status_code.should.equal(200)
res.data.should.equal("test value")
def test_s3_server_post_to_bucket():
test_client = server.app.test_client()
res = test_client.put('/', 'http://foobar.localhost:5000/')
res.status_code.should.equal(200)
test_client.post('/', "https://foobar.localhost:5000/", data={
'key': 'the-key',
'file': 'nothing'
})
res = test_client.get('/the-key', 'http://foobar.localhost:5000/')
res.status_code.should.equal(200)
res.data.should.equal("nothing")