Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75fa390

Browse filesBrowse files
author
Jon Wayne Parrott
committed
Moving monitoring samples to py.test
1 parent 2041ffd commit 75fa390
Copy full SHA for 75fa390

File tree

Expand file treeCollapse file tree

1 file changed

+9
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-12
lines changed

‎monitoring/api/auth_test.py

Copy file name to clipboardExpand all lines: monitoring/api/auth_test.py
+9-12Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@
1414
import re
1515

1616
import auth
17-
import testing
1817

1918

20-
class TestTimeseriesList(testing.CloudTest):
19+
def test_main(cloud_config, capsys):
20+
auth.main(cloud_config.GCLOUD_PROJECT)
21+
output, _ = capsys.readouterr()
2122

22-
def test_main(self):
23-
with testing.capture_stdout() as stdout:
24-
auth.main(self.config.GCLOUD_PROJECT)
25-
26-
output = stdout.getvalue().strip()
27-
28-
self.assertRegexpMatches(
29-
output, re.compile(r'Timeseries.list raw response:\s*'
30-
r'{\s*"kind": "[^"]+",'
31-
r'\s*"oldest": *"[0-9]+', re.S))
23+
assert re.search(
24+
re.compile(
25+
r'Timeseries.list raw response:\s*'
26+
r'{\s*"kind": "[^"]+",'
27+
r'\s*"oldest": *"[0-9]+', re.S),
28+
output)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.