Merge pull request #190 from GoogleCloudPlatform/pytest-storage · ericbolo/python-docs-samples@2041ffd · GitHub
Skip to content

Commit 2041ffd

Browse files
author
Jon Wayne Parrott
committed
Merge pull request GoogleCloudPlatform#190 from GoogleCloudPlatform/pytest-storage
Moving storage samples to py.test
2 parents d0e18c2 + fa3383b commit 2041ffd

4 files changed

Lines changed: 43 additions & 26 deletions

File tree

conftest.py

Lines changed: 18 additions & 0 deletions

storage/api/compose_objects_test.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
# limitations under the License.
1313

1414
from compose_objects import main
15-
from testing import CloudTest
1615

1716

18-
class TestComposeObjects(CloudTest):
19-
def test_main(self):
20-
main(
21-
self.config.CLOUD_STORAGE_BUCKET,
22-
'dest.txt',
23-
[self.resource_path('file1.txt'),
24-
self.resource_path('file2.txt')]
25-
)
17+
def test_main(cloud_config, resource):
18+
main(
19+
cloud_config.CLOUD_STORAGE_BUCKET,
20+
'dest.txt',
21+
[resource('file1.txt'),
22+
resource('file2.txt')]
23+
)

storage/api/list_objects_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# limitations under the License.
1313

1414
from list_objects import main
15-
from testing import CloudTest
1615

1716

18-
class TestListObjects(CloudTest):
19-
def test_main(self):
20-
main(self.config.CLOUD_STORAGE_BUCKET)
17+
def test_main(cloud_config):
18+
main(cloud_config.CLOUD_STORAGE_BUCKET)

testing/cloud.py

Lines changed: 16 additions & 13 deletions

0 commit comments

Comments
 (0)