def test_config_update_creates_profile(temp_dot_bonsai): """ Tests that the update function creates a profile if it does not exist instead of throwing a NoSectionError """ config = Config(profile='FOO') config._update(url='BAR') assert config._has_section('FOO') is True
def test_config_has_section(temp_dot_bonsai): config = Config() assert config._has_section('dev') is True
def test_config_doesnt_have_section(temp_dot_bonsai): config = Config() assert config._has_section('doesnt_exist') is False
def test_config_has_section(): config = Config() assert config._has_section('dev') is True