more s3 tests for posting
This commit is contained in:
parent
9f19662d1c
commit
3bc975188f
3 changed files with 25 additions and 9 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue