def test_remove_from_products_all(): group = UserGroupAction(group_name="SampleUsers") group.remove_from_products(all_products=True) assert group.wire_dict() == { "do": [{ "remove": "all" }], "usergroup": "SampleUsers" }
def test_remove_from_products(): group = UserGroupAction(group_name="SampleUsers") group.remove_from_products(products=["Photoshop", "Illustrator"]) assert group.wire_dict() == { "do": [{ "remove": { "productConfiguration": ["Photoshop", "Illustrator"] } }], "usergroup": "SampleUsers" }
def test_remove_from_products_all_error(): group = UserGroupAction(group_name="SampleUsers") with pytest.raises(ValueError): group.remove_from_products(all_products=True, products=["Photoshop"])