def test__prompt_for_namespace_other_default(): project = Mock(type_info=("Balloon", "Clown", "Service"), settings={}) plugin = JavaLanguagePlugin() with patch("rpdk.core.utils.init_utils.input", return_value="") as mock_input: plugin._prompt_for_namespace(project) mock_input.assert_called_once() assert project.settings == {"namespace": ("com", "balloon", "clown", "service")}
def test__prompt_for_namespace_aws_default(): project = Mock(type_info=("AWS", "Clown", "Service"), settings={}) plugin = JavaLanguagePlugin() with patch("rpdk.core.init.input", return_value="") as mock_input: plugin._prompt_for_namespace(project) mock_input.assert_called_once() assert project.settings == {"namespace": ("software", "amazon", "clown", "service")}
def test__prompt_for_namespace_aws_overwritten(): project = Mock(type_info=("AWS", "Clown", "Service"), settings={}) plugin = JavaLanguagePlugin() with patch( "rpdk.core.utils.init_utils.input", return_value="com.red.clown.service" ) as mock_input: plugin._prompt_for_namespace(project) mock_input.assert_called_once() assert project.settings == {"namespace": ("com", "red", "clown", "service")}