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 11
11
# See the License for the specific language governing permissions and
12
12
# limitations under the License.
13
13
14
+ import re
15
+
14
16
from nose .plugins .attrib import attr
15
17
import tests
16
18
21
23
class TestComputeGettingStarted (tests .CloudBaseTest ):
22
24
23
25
def test_main (self ):
24
- with tests .capture_stdout ():
26
+ with tests .capture_stdout () as mock_stdout :
25
27
main (
26
28
self .project_id ,
27
29
self .bucket_name ,
28
30
'us-central1-f' ,
29
31
'test-instance' ,
30
32
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