71
71
"disable_command", "enable_command", "is_juju1x",
72
72
"remove_service", "env", "deploy", "expose",
73
73
"destroy-model", "remove-machine", "get_status"],
74
disable_command_destroy_model='destroy-model',
75
disable_command_remove_object='remove-object',
76
disable_command_all='all',
74
command_set_destroy_model='destroy-model',
75
command_set_remove_object='remove-object',
76
command_set_all='all',
77
77
destroy_model_command='destroy-model')
78
78
mock_client.is_juju1x.return_value = False
79
79
mock_client.list_disabled_commands.side_effect = [
80
80
make_block_list(mock_client, []),
82
mock_client, [EnvJujuClient.disable_command_destroy_model]),
82
mock_client, [EnvJujuClient.command_set_destroy_model]),
83
83
make_block_list(mock_client, []),
85
mock_client, [EnvJujuClient.disable_command_remove_object]),
85
mock_client, [EnvJujuClient.command_set_remove_object]),
86
86
make_block_list(mock_client, []),
87
make_block_list(mock_client, [EnvJujuClient.disable_command_all]),
87
make_block_list(mock_client, [EnvJujuClient.command_set_all]),
88
88
make_block_list(mock_client, []),
90
90
mock_client.env.environment = 'foo'
137
137
make_block_list(client, []),
139
client, [EnvJujuClient1X.disable_command_destroy_model]),
140
make_block_list(client, []),
142
client, [EnvJujuClient1X.disable_command_remove_object]),
143
make_block_list(client, []),
145
client, [EnvJujuClient1X.disable_command_all]),
139
client, [EnvJujuClient1X.command_set_destroy_model]),
140
make_block_list(client, []),
142
client, [EnvJujuClient1X.command_set_remove_object]),
143
make_block_list(client, []),
145
client, [EnvJujuClient1X.command_set_all]),
146
146
make_block_list(client, []),
148
148
with patch.object(client, 'list_disabled_commands',