def test_load_config_with_invalid_values(self): """ Tests if None is returned when config is not set properly """ client = FusekiTriplestoreClient() fuseki_base_url, ds_name_default, ds_name_shacl, ds_name_harvest = client._get_fuseki_config( ) self.assertIsNone(ds_name_harvest) self.assertIsNone(ds_name_shacl) self.assertIsNone(ds_name_default) self.assertIsNone(fuseki_base_url)
def test_load_config(self, mock_fuseki_available): """ Tests if config is read correctly """ mock_fuseki_available.return_value = False client = FusekiTriplestoreClient() fuseki_base_url, ds_name_default, ds_name_shacl, ds_name_harvest = client._get_fuseki_config( ) self.assertEquals(ds_name_harvest, FUSEKI_HARVEST_DS_NAME) self.assertEquals(ds_name_shacl, FUSEKI_SHACL_DS_NAME) self.assertEquals(ds_name_default, FUSEKI_BASE_DS_NAME) self.assertEquals(fuseki_base_url, FUSEKI_BASE_URL)