| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,18 +14,15 @@ | |||
| 14 | 14 | import re | |
| 15 | 15 | ||
| 16 | 16 | import auth | |
| 17 | - import testing | ||
| 18 | 17 | ||
| 19 | 18 | ||
| 20 | - class TestTimeseriesList(testing.CloudTest): | ||
| 19 | + def test_main(cloud_config, capsys): | ||
| 20 | + auth.main(cloud_config.GCLOUD_PROJECT) | ||
| 21 | + output, _ = capsys.readouterr() | ||
| 21 | 22 | ||
| 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) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments