@@ -1493,7 +1493,7 @@ def test_positive_invalid_release_version(module_sca_manifest_org, module_target
14931493
14941494
14951495# -------------------------- MULTI-CV SCENARIOS -------------------------
1496- def test_positive_create_ak_with_multi_cv_envs (session_multicv_sat , session_multicv_org ):
1496+ def test_positive_create_ak_with_multi_cv_envs (module_target_sat , module_org ):
14971497 """Verify that multiple content view environments can be assigned during activation key creation
14981498
14991499 :id: 263a6c90-88bf-4888-b1b9-172751a609f3
@@ -1510,14 +1510,13 @@ def test_positive_create_ak_with_multi_cv_envs(session_multicv_sat, session_mult
15101510 """
15111511 # Create two lifecycle environments
15121512 lces_list = [
1513- session_multicv_sat .api .LifecycleEnvironment (organization = session_multicv_org ).create ()
1513+ module_target_sat .api .LifecycleEnvironment (organization = module_org ).create ()
15141514 for i in range (2 )
15151515 ]
15161516 lce1 , lce2 = lces_list
15171517 # Create two content views
15181518 cvs_list = [
1519- session_multicv_sat .api .ContentView (organization = session_multicv_org ).create ()
1520- for i in range (2 )
1519+ module_target_sat .api .ContentView (organization = module_org ).create () for i in range (2 )
15211520 ]
15221521 for i in range (2 ):
15231522 cvs_list [i ].publish ()
@@ -1528,9 +1527,9 @@ def test_positive_create_ak_with_multi_cv_envs(session_multicv_sat, session_mult
15281527 # Create an activation key with created content view environments
15291528 ak_name = gen_string ('alpha' )
15301529 cv_envs = f'{ lce1 .name } /{ cv1 .name } ,{ lce2 .name } /{ cv2 .name } '
1531- ak = session_multicv_sat .cli .ActivationKey .create (
1530+ ak = module_target_sat .cli .ActivationKey .create (
15321531 {
1533- 'organization-id' : session_multicv_org .id ,
1532+ 'organization-id' : module_org .id ,
15341533 'content-view-environments' : cv_envs ,
15351534 'name' : ak_name ,
15361535 }
@@ -1541,7 +1540,7 @@ def test_positive_create_ak_with_multi_cv_envs(session_multicv_sat, session_mult
15411540
15421541
15431542def test_positive_multi_cv_info_and_remove_all_cv_envs (
1544- session_multicv_sat , session_multicv_org , session_multicv_default_ak
1543+ module_target_sat , module_org , module_default_ak
15451544):
15461545 """Verify that multi content view environment details displays into hammer activation-key info commands output, and
15471546 also remove all content view environments & verify output
@@ -1563,14 +1562,13 @@ def test_positive_multi_cv_info_and_remove_all_cv_envs(
15631562 """
15641563 # Create two lifecycle environments
15651564 lces_list = [
1566- session_multicv_sat .api .LifecycleEnvironment (organization = session_multicv_org ).create ()
1565+ module_target_sat .api .LifecycleEnvironment (organization = module_org ).create ()
15671566 for i in range (2 )
15681567 ]
15691568 lce1 , lce2 = lces_list
15701569 # Create two content views
15711570 cvs_list = [
1572- session_multicv_sat .api .ContentView (organization = session_multicv_org ).create ()
1573- for i in range (2 )
1571+ module_target_sat .api .ContentView (organization = module_org ).create () for i in range (2 )
15741572 ]
15751573 for i in range (2 ):
15761574 cvs_list [i ].publish ()
@@ -1579,36 +1577,36 @@ def test_positive_multi_cv_info_and_remove_all_cv_envs(
15791577 cv1 , cv2 = cvs_list
15801578
15811579 # Update ak with multiple content view environments
1582- ak = session_multicv_default_ak
1580+ ak = module_default_ak
15831581 cv_envs = f'{ lce1 .name } /{ cv1 .name } ,{ lce2 .name } /{ cv2 .name } '
1584- ak_info = session_multicv_sat .cli .ActivationKey .info ({'id' : ak .id })
1582+ ak_info = module_target_sat .cli .ActivationKey .info ({'id' : ak .id })
15851583 assert ak_info ['multi-content-view-environment' ] == 'no'
15861584 assert ak_info ['content-view-environment-labels' ] == 'Library'
15871585
1588- ret_val = session_multicv_sat .cli .ActivationKey .update (
1586+ ret_val = module_target_sat .cli .ActivationKey .update (
15891587 {
15901588 'id' : ak .id ,
1591- 'organization-id' : session_multicv_org .id ,
1589+ 'organization-id' : module_org .id ,
15921590 'content-view-environments' : cv_envs ,
15931591 }
15941592 )
15951593 assert ret_val [0 ]['message' ] == 'Activation key updated.'
15961594
15971595 # Verify ak info displays 'Multi Content View Environment' and 'Content View Environments'
1598- ak_info = session_multicv_sat .cli .ActivationKey .info ({'id' : ak .id })
1596+ ak_info = module_target_sat .cli .ActivationKey .info ({'id' : ak .id })
15991597 assert ak_info ['multi-content-view-environment' ] == 'yes'
16001598 assert ak_info ['content-view-environment-labels' ] == cv_envs
16011599
16021600 # Remove all content view environments from the activation key
1603- session_multicv_sat .cli .ActivationKey .update (
1601+ module_target_sat .cli .ActivationKey .update (
16041602 {
16051603 'id' : ak .id ,
1606- 'organization-id' : session_multicv_org .id ,
1604+ 'organization-id' : module_org .id ,
16071605 'content-view-environments' : '' ,
16081606 }
16091607 )
16101608 # Verify ak info doesn't display any 'Content View Environments'
1611- ak_info = session_multicv_sat .cli .ActivationKey .info ({'id' : ak .id })
1609+ ak_info = module_target_sat .cli .ActivationKey .info ({'id' : ak .id })
16121610 assert ak_info ['multi-content-view-environment' ] == 'no'
16131611 assert ak_info ['content-view-environment-labels' ] == {}
16141612
0 commit comments