This repository has been archived by the owner on Jul 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,4 +112,7 @@ | |
* Fixed tests | ||
|
||
## 1.6.6 | ||
* Updated readme | ||
* Updated readme | ||
|
||
## 1.6.7 | ||
* Implemented asynchronous input generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.6.6 | ||
1.6.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from time import sleep | ||
|
||
import unittest | ||
from bitcodin import create_input, get_input, get_async_input_status | ||
from bitcodin import delete_input | ||
from bitcodin import S3Input | ||
from bitcodin.test.settings import s3_input_config | ||
from bitcodin.test.bitcodin_test_case import BitcodinTestCase | ||
|
||
|
||
class CreateS3InputTestCase(BitcodinTestCase): | ||
def setUp(self): | ||
super(CreateS3InputTestCase, self).setUp() | ||
|
||
def runTest(self): | ||
input = S3Input( | ||
access_key=s3_input_config.get('access_key'), | ||
secret_key=s3_input_config.get('secret_key'), | ||
host=s3_input_config.get('host'), | ||
bucket=s3_input_config.get('bucket'), | ||
region=s3_input_config.get('region'), | ||
object_key=s3_input_config.get('object_key') | ||
) | ||
|
||
self.input = create_input(input, True) | ||
|
||
async_input_status = get_async_input_status(self.input.input_id) | ||
while async_input_status.status != 'CREATED': | ||
async_input_status = get_async_input_status(async_input_status.input_id) | ||
self.assertNotEqual(async_input_status.status, 'ERROR') | ||
print(async_input_status.to_json()) | ||
sleep(5) | ||
|
||
self.input = get_input(self.input.input_id) | ||
self.assertEquals(self.input.host, input.host) | ||
self.assertEquals(self.input.bucket, input.bucket) | ||
self.assertEquals(self.input.region, input.region) | ||
self.assertEquals(self.input.status, 'CREATED') | ||
|
||
def tearDown(self): | ||
delete_input(self.input.input_id) | ||
super(CreateS3InputTestCase, self).tearDown() | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters