Example #1
0
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
Example #2
0
def test_config_has_section(temp_dot_bonsai):
    config = Config()
    assert config._has_section('dev') is True
Example #3
0
def test_config_doesnt_have_section(temp_dot_bonsai):
    config = Config()
    assert config._has_section('doesnt_exist') is False
Example #4
0
def test_config_has_section():
    config = Config()
    assert config._has_section('dev') is True