From 8bf58b21da40f0eea5b40631db72c54d7d0a7335 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Fri, 19 Feb 2016 12:53:41 -0800 Subject: [PATCH] Moving blog samples to py.test --- .../blog_test.py | 12 ++++-------- .../wiki_test.py | 13 ++++--------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py b/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py index 6da23560cf0..4959229e7b2 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/blog_test.py @@ -12,13 +12,9 @@ # limitations under the License. from blog import main -import pytest -from testing import CloudTest +from testing import mark_flaky -@pytest.mark.slow -class BlogTestCase(CloudTest): - """Simple test case that ensures the blog code doesn't throw any errors.""" - - def test_main(self): - main(self.config.GCLOUD_PROJECT) +@mark_flaky +def test_main(cloud_config): + main(cloud_config.GCLOUD_PROJECT) diff --git a/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py b/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py index 4ad37a2ba26..a4ff93d97f0 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py +++ b/blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py @@ -11,15 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. - -import pytest -from testing import CloudTest +from testing import mark_flaky from wiki import main -@pytest.mark.slow -class WikiTestCase(CloudTest): - """Simple test case that ensures the wiki code doesn't throw any errors.""" - - def test_main(self): - main(self.config.GCLOUD_PROJECT) +@mark_flaky +def test_main(cloud_config): + main(cloud_config.GCLOUD_PROJECT)