Exemplo n.º 1
0
 def test_read_a_config_from_common_config_file(self,
                                                mock_is_env_raspberry):
     mock_is_env_raspberry.return_value = False
     actual_value = configuration.read_config_value("SectionCommonTest",
                                                    "AKey")
     assert actual_value == "AValue"
Exemplo n.º 2
0
 def test_read_a_config_value_when_on_raspi(self, mock_is_env_raspberry):
     """Reads the value SectionHttpServer#Url from the config. is_env_raspberry is mocked"""
     mock_is_env_raspberry.return_value = True
     actual_value = configuration.read_config_value("SectionHttpServer",
                                                    "Url")
     assert actual_value == "192.168.0.220"
Exemplo n.º 3
0
 def test_read_a_config_value(self, mock_is_env_raspberry):
     """Reads the value SectionHttpServer#Url from the config. is_env_raspberry is mocked"""
     mock_is_env_raspberry.return_value = False
     actual_value = configuration.read_config_value("SectionHttpServer",
                                                    "Url")
     assert actual_value == "127.0.0.1"
Exemplo n.º 4
0
def _vlc_get_port():
    return configuration.read_config_value("SectionVlcConnection", "VlcPort")
Exemplo n.º 5
0
def _vlc_get_host():
    return configuration.read_config_value("SectionVlcConnection", "VlcHost")
Exemplo n.º 6
0
def get_host_from_config():
    return configuration.read_config_value("SectionHttpServer", "Url")