We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2041ffd commit 75fa390Copy full SHA for 75fa390
monitoring/api/auth_test.py
@@ -14,18 +14,15 @@
14
import re
15
16
import auth
17
-import testing
18
19
20
-class TestTimeseriesList(testing.CloudTest):
+def test_main(cloud_config, capsys):
+ auth.main(cloud_config.GCLOUD_PROJECT)
21
+ output, _ = capsys.readouterr()
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))
+ assert re.search(
+ re.compile(
+ r'Timeseries.list raw response:\s*'
+ r'{\s*"kind": "[^"]+",'
+ r'\s*"oldest": *"[0-9]+', re.S),
+ output)
0 commit comments