Skip to content

Commit b950c59

Browse files
author
Jon Wayne Parrott
committed
Merge pull request #195 from GoogleCloudPlatform/pytest-blog
Moving blog samples to py.test
2 parents 51fe4f0 + 8bf58b2 commit b950c59

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

blog/introduction_to_data_models_in_cloud_datastore/blog_test.py

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

1414
from blog import main
15-
import pytest
16-
from testing import CloudTest
15+
from testing import mark_flaky
1716

1817

19-
@pytest.mark.slow
20-
class BlogTestCase(CloudTest):
21-
"""Simple test case that ensures the blog code doesn't throw any errors."""
22-
23-
def test_main(self):
24-
main(self.config.GCLOUD_PROJECT)
18+
@mark_flaky
19+
def test_main(cloud_config):
20+
main(cloud_config.GCLOUD_PROJECT)

blog/introduction_to_data_models_in_cloud_datastore/wiki_test.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313

14-
15-
import pytest
16-
from testing import CloudTest
14+
from testing import mark_flaky
1715
from wiki import main
1816

1917

20-
@pytest.mark.slow
21-
class WikiTestCase(CloudTest):
22-
"""Simple test case that ensures the wiki code doesn't throw any errors."""
23-
24-
def test_main(self):
25-
main(self.config.GCLOUD_PROJECT)
18+
@mark_flaky
19+
def test_main(cloud_config):
20+
main(cloud_config.GCLOUD_PROJECT)

0 commit comments

Comments
 (0)