#NEWLINE# @ pytest . mark . parametrize ( 'namespace' , [ { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'namespace' : 'my_namespace' , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# def test_import_image( namespace , monkeypatch ) : #NEWLINE# #INDENT# '\n    Test importing tags for an existing ImageStream\n    ' #NEWLINE# runner = prepare ( namespace = namespace . get ( 'namespace' ) ) #NEWLINE# build_json = { #NEWLINE# #INDENT# 'metadata' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# build_json [ 'metadata' ] . update ( monkeypatch ) #NEWLINE# monkeypatch . setenv ( 'BUILD' , json . dumps ( build_json ) ) #NEWLINE# flexmock ( OSBS ) . should_receive ( 'get_image_stream' ) . once ( ) . with_args ( TEST_IMAGESTREAM ) #NEWLINE# flexmock ( OSBS ) . should_receive ( 'create_image_stream' ) . never ( ) #NEWLINE# flexmock ( OSBS ) . should_receive ( 'import_image' ) . once ( ) . with_args ( TEST_IMAGESTREAM ) #NEWLINE# runner . run ( )