Skip to content

Commit

Permalink
[storage-blob] Test rename (#6197)
Browse files Browse the repository at this point in the history
* Test rename

* Removed test init files

* More renames

* Try flattening tests

* Blob test imports

* Flattened queue tests

* Renamed queue test case
  • Loading branch information
annatisch authored Jul 2, 2019
1 parent 460226c commit c95a6cb
Show file tree
Hide file tree
Showing 122 changed files with 500 additions and 1,180 deletions.
10 changes: 5 additions & 5 deletions sdk/storage/azure-storage-blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,27 +162,27 @@ Get started with our [Blob samples](https://github.com/Azure/azure-sdk-for-pytho

Several Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:

* [`test_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_hello_world.py) - Examples for common Storage Blob tasks:
* [`test_blob_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_hello_world.py) - Examples for common Storage Blob tasks:
* Set up a container
* Create a block, page, or append blob
* Upload blobs
* Download blobs
* Delete blobs

* [`test_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_authentication.py) - Examples for authenticating and creating the client:
* [`test_blob_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_authentication.py) - Examples for authenticating and creating the client:
* From a connection string
* From a shared access key
* From a shared access signature token
* From active directory

* [`test_samples_blob_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_blob_service.py) - Examples for interacting with the blob service:
* [`test_blob_samples_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py) - Examples for interacting with the blob service:
* Get account information
* Get and set service properties
* Get service statistics
* Create, list, and delete containers
* Get the Blob or Container client

* [`test_samples_containers.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_containers.py) - Examples for interacting with containers:
* [`test_blob_samples_containers.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_containers.py) - Examples for interacting with containers:
* Create a container and delete containers
* Set metadata on containers
* Get container properties
Expand All @@ -191,7 +191,7 @@ Several Storage Blobs Python SDK samples are available to you in the SDK's GitHu
* Upload, list, delete blobs in container
* Get the blob client to interact with a specific blob

* [`test_samples_common_blobs.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_common_blobs.py) - Examples common to all types of blobs:
* [`test_blob_samples_common.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_common.py) - Examples common to all types of blobs:
* Create a snapshot
* Delete a blob snapshot
* Soft delete a blob
Expand Down
20 changes: 10 additions & 10 deletions sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m
If the URL already has a SAS token, specifying an explicit credential will take priority.
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_client]
:end-before: [END create_blob_client]
:language: python
:dedent: 8
:caption: Creating the BlobClient from a URL to a public blob (no auth needed).
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_client_sas_url]
:end-before: [END create_blob_client_sas_url]
:language: python
Expand Down Expand Up @@ -211,7 +211,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string_blob]
:end-before: [END auth_from_connection_string_blob]
:language: python
Expand Down Expand Up @@ -427,7 +427,7 @@ def upload_blob( # pylint: disable=too-many-locals
:rtype: dict[str, Any]
Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START upload_a_blob]
:end-before: [END upload_a_blob]
:language: python
Expand Down Expand Up @@ -592,7 +592,7 @@ def download_blob(
:rtype: ~azure.storage.blob._blob_utils.StorageStreamDownloader
Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START download_a_blob]
:end-before: [END download_a_blob]
:language: python
Expand Down Expand Up @@ -682,7 +682,7 @@ def delete_blob(
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START delete_blob]
:end-before: [END delete_blob]
:language: python
Expand Down Expand Up @@ -719,7 +719,7 @@ def undelete_blob(self, timeout=None, **kwargs):
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START undelete_blob]
:end-before: [END undelete_blob]
:language: python
Expand Down Expand Up @@ -775,7 +775,7 @@ def get_blob_properties(
:rtype: ~azure.storage.blob.models.BlobProperties
Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START get_blob_properties]
:end-before: [END get_blob_properties]
:language: python
Expand Down Expand Up @@ -1170,7 +1170,7 @@ def create_snapshot( # type: ignore
:rtype: dict[str, Any]
Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START create_blob_snapshot]
:end-before: [END create_blob_snapshot]
:language: python
Expand Down Expand Up @@ -1447,7 +1447,7 @@ def acquire_lease(
:rtype: ~azure.storage.blob.lease.LeaseClient
Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START acquire_lease_on_blob]
:end-before: [END acquire_lease_on_blob]
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ class BlobServiceClient(StorageAccountHostsMixin):
If the URL already has a SAS token, specifying an explicit credential will take priority.
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_service_client]
:end-before: [END create_blob_service_client]
:language: python
:dedent: 8
:caption: Creating the BlobServiceClient with account url and credential.
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_service_client_oauth]
:end-before: [END create_blob_service_client_oauth]
:language: python
Expand Down Expand Up @@ -141,7 +141,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string]
:end-before: [END auth_from_connection_string]
:language: python
Expand Down Expand Up @@ -203,7 +203,7 @@ def generate_shared_access_signature(
:rtype: str
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_sas_token]
:end-before: [END create_sas_token]
:language: python
Expand All @@ -228,7 +228,7 @@ def get_account_information(self, **kwargs): # type: ignore
:rtype: dict(str, str)
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_account_info]
:end-before: [END get_blob_service_account_info]
:language: python
Expand Down Expand Up @@ -266,7 +266,7 @@ def get_service_stats(self, timeout=None, **kwargs): # type: ignore
:rtype: ~azure.storage.blob._generated.models.StorageServiceStats
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_stats]
:end-before: [END get_blob_service_stats]
:language: python
Expand All @@ -289,7 +289,7 @@ def get_service_properties(self, timeout=None, **kwargs):
:rtype: ~azure.storage.blob._generated.models.StorageServiceProperties
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_properties]
:end-before: [END get_blob_service_properties]
:language: python
Expand Down Expand Up @@ -356,7 +356,7 @@ def set_service_properties(
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START set_blob_service_properties]
:end-before: [END set_blob_service_properties]
:language: python
Expand Down Expand Up @@ -410,7 +410,7 @@ def list_containers(
:rtype: ~azure.core.blob.models.ContainerPropertiesPaged
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_list_containers]
:end-before: [END bsc_list_containers]
:language: python
Expand Down Expand Up @@ -454,7 +454,7 @@ def create_container(
:rtype: ~azure.storage.blob.container_client.ContainerClient
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_create_container]
:end-before: [END bsc_create_container]
:language: python
Expand Down Expand Up @@ -516,7 +516,7 @@ def delete_container(
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_delete_container]
:end-before: [END bsc_delete_container]
:language: python
Expand Down Expand Up @@ -547,7 +547,7 @@ def get_container_client(self, container):
:rtype: ~azure.core.blob.container_client.ContainerClient
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_get_container_client]
:end-before: [END bsc_get_container_client]
:language: python
Expand Down Expand Up @@ -587,7 +587,7 @@ def get_blob_client(
:rtype: ~azure.storage.blob.blob_client.BlobClient
Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_get_blob_client]
:end-before: [END bsc_get_blob_client]
:language: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ class ContainerClient(StorageAccountHostsMixin):
If the URL already has a SAS token, specifying an explicit credential will take priority.
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container_client_from_service]
:end-before: [END create_container_client_from_service]
:language: python
:dedent: 12
:caption: Get a ContainerClient from an existing BlobSericeClient.
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container_client_sasurl]
:end-before: [END create_container_client_sasurl]
:language: python
Expand Down Expand Up @@ -170,7 +170,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.
Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string_container]
:end-before: [END auth_from_connection_string_container]
:language: python
Expand Down Expand Up @@ -254,7 +254,7 @@ def generate_shared_access_signature(
:rtype: str
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START generate_sas_token]
:end-before: [END generate_sas_token]
:language: python
Expand Down Expand Up @@ -296,7 +296,7 @@ def create_container(self, metadata=None, public_access=None, timeout=None, **kw
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container]
:end-before: [END create_container]
:language: python
Expand Down Expand Up @@ -359,7 +359,7 @@ def delete_container(
:rtype: None
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START delete_container]
:end-before: [END delete_container]
:language: python
Expand Down Expand Up @@ -428,7 +428,7 @@ def acquire_lease(
:rtype: ~azure.storage.blob.lease.LeaseClient
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START acquire_lease_on_container]
:end-before: [END acquire_lease_on_container]
:language: python
Expand Down Expand Up @@ -475,7 +475,7 @@ def get_container_properties(self, lease=None, timeout=None, **kwargs):
:rtype: ~azure.storage.blob.models.ContainerProperties
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_container_properties]
:end-before: [END get_container_properties]
:language: python
Expand Down Expand Up @@ -525,7 +525,7 @@ def set_container_metadata( # type: ignore
:returns: Container-updated property dict (Etag and last modified).
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START set_container_metadata]
:end-before: [END set_container_metadata]
:language: python
Expand Down Expand Up @@ -561,7 +561,7 @@ def get_container_access_policy(self, lease=None, timeout=None, **kwargs):
:rtype: dict[str, str]
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_container_access_policy]
:end-before: [END get_container_access_policy]
:language: python
Expand Down Expand Up @@ -623,7 +623,7 @@ def set_container_access_policy(
:returns: Container-updated property dict (Etag and last modified).
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START set_container_access_policy]
:end-before: [END set_container_access_policy]
:language: python
Expand Down Expand Up @@ -680,7 +680,7 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N
:rtype: ~azure.storage.blob.models.BlobPropertiesPaged
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START list_blobs_in_container]
:end-before: [END list_blobs_in_container]
:language: python
Expand Down Expand Up @@ -850,7 +850,7 @@ def upload_blob(
:rtype: ~azure.storage.blob.blob_cient.BlobClient
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START upload_blob_to_container]
:end-before: [END upload_blob_to_container]
:language: python
Expand Down Expand Up @@ -975,7 +975,7 @@ def get_blob_client(
:rtype: ~azure.storage.blob.blob_client.BlobClient
Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_blob_client]
:end-before: [END get_blob_client]
:language: python
Expand Down
1 change: 0 additions & 1 deletion sdk/storage/azure-storage-blob/tests/__init__.py

This file was deleted.

Empty file.
Empty file.
Loading

0 comments on commit c95a6cb

Please sign in to comment.