File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1111# See the License for the specific language governing permissions and
1212# limitations under the License.
1313
14+ import re
15+
1416from nose .plugins .attrib import attr
1517import tests
1618
2123class TestComputeGettingStarted (tests .CloudBaseTest ):
2224
2325 def test_main (self ):
24- with tests .capture_stdout ():
26+ with tests .capture_stdout () as mock_stdout :
2527 main (
2628 self .project_id ,
2729 self .bucket_name ,
2830 'us-central1-f' ,
2931 'test-instance' ,
3032 wait = False )
33+
34+ stdout = mock_stdout .getvalue ()
35+
36+ expected_output = re .compile (
37+ (r'Instances in project %s and zone us-central1-.* - test-instance'
38+ r'.*Deleting instance.*done..$' ) % self .project_id ,
39+ re .DOTALL )
40+ self .assertRegexpMatches (
41+ stdout ,
42+ expected_output )
You can’t perform that action at this time.
0 commit comments