Exemple #1
0
 def configuration(self):
     Configuration._create(
         hdx_read_only=True,
         user_agent="test",
         project_config_yaml=join("tests", "config",
                                  "project_configuration.yml"),
     )
     Locations.set_validlocations([{
         "name": "afg",
         "title": "Afghanistan"
     }])  # add locations used in tests
     Country.countriesdata(use_live=False)
     Vocabulary._tags_dict = True
     Vocabulary._approved_vocabulary = {
         "tags": [
             {
                 "name": "hxl"
             },
             {
                 "name": "food security"
             },
             {
                 "name": "indicators"
             },
         ],
         "id":
         "4e61d464-4943-4e97-973a-84673c1aaa87",
         "name":
         "approved",
     }
     return Configuration.read()
Exemple #2
0
 def configuration(self):
     Configuration._create(
         user_agent="test",
         hdx_key="12345",
         project_config_yaml=join("tests", "config",
                                  "project_configuration.yml"),
     )
     Locations.set_validlocations([{"name": "bgd", "title": "Bangladesh"}])
     Country.countriesdata(use_live=False)
     Vocabulary._tags_dict = True
     Vocabulary._approved_vocabulary = {
         "tags": [
             {
                 "name": "hxl"
             },
             {
                 "name": "refugees"
             },
             {
                 "name": "asylum"
             },
             {
                 "name": "population"
             },
         ],
         "id":
         "4e61d464-4943-4e97-973a-84673c1aaa87",
         "name":
         "approved",
     }
     return Configuration.read()
Exemple #3
0
def configuration():
    project_config_yaml = join("tests", "fixtures",
                               "project_configuration.yml")
    Configuration._create(
        hdx_site="prod",
        user_agent="test",
        hdx_read_only=True,
        project_config_yaml=project_config_yaml,
    )
    return Configuration.read()
 def configuration(self):
     Configuration._create(
         hdx_read_only=True,
         hdx_site="prod",
         user_agent="test",
         project_config_yaml=join("tests", "config",
                                  "project_configuration.yml"),
     )
     Locations.set_validlocations([
         {
             "name": "afg",
             "title": "Afghanistan"
         },
         {
             "name": "pse",
             "title": "State of Palestine"
         },
     ])
     return Configuration.read()
 def configuration(self):
     Configuration._create(
         user_agent="test",
         hdx_key="12345",
         project_config_yaml=join("tests", "config",
                                  "project_configuration.yml"),
     )
     Locations.set_validlocations([
         {
             "name": "afg",
             "title": "Afghanistan"
         },
         {
             "name": "phl",
             "title": "Philippines"
         },
     ])
     Country.countriesdata(use_live=False)
     return Configuration.read()
 def configuration(self):
     Configuration._create(
         user_agent="test",
         hdx_key="12345",
         project_config_yaml=join("tests", "config",
                                  "project_configuration.yml"),
     )
     Locations.set_validlocations([
         {
             "name": "afg",
             "title": "Afghanistan"
         },
         {
             "name": "phl",
             "title": "Philippines"
         },
     ])
     Country.countriesdata(use_live=False)
     Vocabulary._tags_dict = True
     Vocabulary._approved_vocabulary = {
         "tags": [
             {
                 "name": "common operational dataset - cod"
             },
             {
                 "name": "administrative divisions"
             },
             {
                 "name": "geodata"
             },
             {
                 "name": "gazetteer"
             },
         ],
         "id":
         "4e61d464-4943-4e97-973a-84673c1aaa87",
         "name":
         "approved",
     }
     return Configuration.read()