-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Queues] Migrate to devtools test framework #6882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rakshith91
merged 10 commits into
Azure:feature/storage-preview3
from
rakshith91:devtools_refactor_storage
Sep 6, 2019
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d81a3cb
initial migration
rakshith91 4cbf1a4
samples
rakshith91 4342985
comments
rakshith91 7f71326
queues test fixes
rakshith91 b472604
recodings update
rakshith91 a09b126
update
rakshith91 38eab5f
comment address
rakshith91 abfe03f
pylint fix
rakshith91 c2abe12
Merge branch 'feature/storage-preview3' into devtools_refactor_storage
rakshith91 4c6d3b8
comments address
rakshith91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
29 changes: 29 additions & 0 deletions
29
sdk/storage/azure-storage-queue/tests/asyncqueuetestcase.py
This file contains hidden or 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,29 @@ | ||
| # coding: utf-8 | ||
| # ------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # -------------------------------------------------------------------------- | ||
| import asyncio | ||
| import functools | ||
| from queuetestcase import QueueTestCase | ||
|
|
||
| LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' | ||
|
|
||
| class AsyncQueueTestCase(QueueTestCase): | ||
| @staticmethod | ||
| def await_prepared_test(test_fn): | ||
| """Synchronous wrapper for async test methods. Used to avoid making changes | ||
| upstream to AbstractPreparer (which doesn't await the functions it wraps) | ||
| """ | ||
|
|
||
| @functools.wraps(test_fn) | ||
| def run(test_class_instance, *args, **kwargs): | ||
| resource_group = kwargs.get("resource_group") | ||
| location = kwargs.get("location") | ||
| storage_account = kwargs.get("storage_account") | ||
| storage_account_key = kwargs.get("storage_account_key") | ||
| loop = asyncio.get_event_loop() | ||
| return loop.run_until_complete(test_fn(test_class_instance, resource_group, location, storage_account, storage_account_key)) | ||
|
|
||
| return run | ||
56 changes: 0 additions & 56 deletions
56
sdk/storage/azure-storage-queue/tests/queue_settings_fake.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.