First working tests!
This commit is contained in:
parent
e00af2f73c
commit
9c00f572d6
13 changed files with 216 additions and 38 deletions
45
tests/test_datasync/test_datasync.py
Normal file
45
tests/test_datasync/test_datasync.py
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import logging
|
||||
|
||||
import boto
|
||||
import boto3
|
||||
from moto import mock_datasync
|
||||
|
||||
|
||||
@mock_datasync
|
||||
def test_create_location_smb():
|
||||
client = boto3.client("datasync", region_name="us-east-1")
|
||||
response = client.create_location_smb(ServerHostname='host',
|
||||
Subdirectory='somewhere',
|
||||
User='',
|
||||
Password='',
|
||||
AgentArns=['stuff'])
|
||||
assert 'LocationArn' in response
|
||||
|
||||
|
||||
@mock_datasync
|
||||
def test_create_location_s3():
|
||||
client = boto3.client("datasync", region_name="us-east-1")
|
||||
response = client.create_location_s3(S3BucketArn='my_bucket',
|
||||
Subdirectory='dir',
|
||||
S3Config={'BucketAccessRoleArn':'role'})
|
||||
assert 'LocationArn' in response
|
||||
|
||||
'''
|
||||
@mock_datasync
|
||||
def test_list_locations():
|
||||
client = boto3.client("datasync", region_name="us-east-1")
|
||||
response = client.list_locations()
|
||||
logging.info ('No locations: {0}'.format(response))
|
||||
|
||||
response = client.create_location_smb(ServerHostname='host',
|
||||
Subdirectory='somewhere',
|
||||
User='',
|
||||
Password='',
|
||||
AgentArns=['stuff'])
|
||||
logging.info ('A location 1 : {0}'.format(response))
|
||||
response = client.list_locations()
|
||||
logging.info ('A location 2 : {0}'.format(response))
|
||||
|
||||
assert 1 == 0
|
||||
#assert response == ["TestLocation"]
|
||||
'''
|
||||
Loading…
Add table
Add a link
Reference in a new issue