Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
143
Merge Requests
143
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
735600e2
Commit
735600e2
authored
Aug 12, 2024
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Why?
parent
dba378d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
244 additions
and
238 deletions
+244
-238
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_getRegionTitleItemList.py
..._standard/BusinessConfiguration_getRegionTitleItemList.py
+238
-238
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testXForwardedFor.py
...lateItem/portal_components/test.erp5.testXForwardedFor.py
+6
-0
No files found.
bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_getRegionTitleItemList.py
View file @
735600e2
...
@@ -6,243 +6,243 @@ if context.getGlobalConfigurationAttr('categories_spreadsheet_configuration_save
...
@@ -6,243 +6,243 @@ if context.getGlobalConfigurationAttr('categories_spreadsheet_configuration_save
return
item_list_from_spreadsheet
return
item_list_from_spreadsheet
region_item_list
=
[
region_item_list
=
[
(
'Afghanistan'
,
'asia/southern_asia/afghanistan'
),
(
b
'Afghanistan'
,
'asia/southern_asia/afghanistan'
),
(
'Albania'
,
'europe/southern_europe/albania'
),
(
b
'Albania'
,
'europe/southern_europe/albania'
),
(
'Algeria'
,
'africa/northern_africa/algeria'
),
(
b
'Algeria'
,
'africa/northern_africa/algeria'
),
(
'American Samoa'
,
'oceania/polynesia/american_samoa'
),
(
b
'American Samoa'
,
'oceania/polynesia/american_samoa'
),
(
'Andorra'
,
'europe/southern_europe/andorra'
),
(
b
'Andorra'
,
'europe/southern_europe/andorra'
),
(
'Angola'
,
'africa/middle_africa/angola'
),
(
b
'Angola'
,
'africa/middle_africa/angola'
),
(
'Anguilla'
,
'americas/caribbean/anguilla'
),
(
b
'Anguilla'
,
'americas/caribbean/anguilla'
),
(
'Antigua and Barbuda'
,
'americas/caribbean/antigua_and_barbuda'
),
(
b
'Antigua and Barbuda'
,
'americas/caribbean/antigua_and_barbuda'
),
(
'Argentina'
,
'americas/south_america/argentina'
),
(
b
'Argentina'
,
'americas/south_america/argentina'
),
(
'Armenia'
,
'asia/western_asia/armenia'
),
(
b
'Armenia'
,
'asia/western_asia/armenia'
),
(
'Aruba'
,
'americas/caribbean/aruba'
),
(
b
'Aruba'
,
'americas/caribbean/aruba'
),
(
'Australia'
,
'oceania/australia/australia'
),
(
b
'Australia'
,
'oceania/australia/australia'
),
(
'Austria'
,
'europe/western_europe/austria'
),
(
b
'Austria'
,
'europe/western_europe/austria'
),
(
'Azerbaijan'
,
'asia/western_asia/azerbaijan'
),
(
b
'Azerbaijan'
,
'asia/western_asia/azerbaijan'
),
(
'Bahamas'
,
'americas/caribbean/bahamas'
),
(
b
'Bahamas'
,
'americas/caribbean/bahamas'
),
(
'Bahrain'
,
'asia/western_asia/bahrain'
),
(
b
'Bahrain'
,
'asia/western_asia/bahrain'
),
(
'Bangladesh'
,
'asia/southern_asia/bangladesh'
),
(
b
'Bangladesh'
,
'asia/southern_asia/bangladesh'
),
(
'Barbados'
,
'americas/caribbean/barbados'
),
(
b
'Barbados'
,
'americas/caribbean/barbados'
),
(
'Belarus'
,
'europe/eastern_europe/belarus'
),
(
b
'Belarus'
,
'europe/eastern_europe/belarus'
),
(
'Belgium'
,
'europe/western_europe/belgium'
),
(
b
'Belgium'
,
'europe/western_europe/belgium'
),
(
'Belize'
,
'americas/central_america/belize'
),
(
b
'Belize'
,
'americas/central_america/belize'
),
(
'Benin'
,
'africa/western_africa/benin'
),
(
b
'Benin'
,
'africa/western_africa/benin'
),
(
'Bermuda'
,
'americas/northern_america/bermuda'
),
(
b
'Bermuda'
,
'americas/northern_america/bermuda'
),
(
'Bhutan'
,
'asia/southern_asia/bhutan'
),
(
b
'Bhutan'
,
'asia/southern_asia/bhutan'
),
(
'Bolivia'
,
'americas/south_america/bolivia'
),
(
b
'Bolivia'
,
'americas/south_america/bolivia'
),
(
'Bosnia and Herzegovina'
,
'europe/southern_europe/bosnia_and_herzegovina'
),
(
b
'Bosnia and Herzegovina'
,
'europe/southern_europe/bosnia_and_herzegovina'
),
(
'Botswana'
,
'africa/southern_africa/botswana'
),
(
b
'Botswana'
,
'africa/southern_africa/botswana'
),
(
'Brazil'
,
'americas/south_america/brazil'
),
(
b
'Brazil'
,
'americas/south_america/brazil'
),
(
'British Virgin Islands'
,
'americas/caribbean/british_virgin_islands'
),
(
b
'British Virgin Islands'
,
'americas/caribbean/british_virgin_islands'
),
(
'Brunei Darussalam'
,
'asia/south-eastern_asia/brunei_darussalam'
),
(
b
'Brunei Darussalam'
,
'asia/south-eastern_asia/brunei_darussalam'
),
(
'Bulgaria'
,
'europe/eastern_europe/bulgaria'
),
(
b
'Bulgaria'
,
'europe/eastern_europe/bulgaria'
),
(
'Burkina Faso'
,
'africa/western_africa/burkina_faso'
),
(
b
'Burkina Faso'
,
'africa/western_africa/burkina_faso'
),
(
'Burundi'
,
'africa/eastern_africa/burundi'
),
(
b
'Burundi'
,
'africa/eastern_africa/burundi'
),
(
'Cambodia'
,
'asia/south-eastern_asia/cambodia'
),
(
b
'Cambodia'
,
'asia/south-eastern_asia/cambodia'
),
(
'Cameroon'
,
'africa/middle_africa/cameroon'
),
(
b
'Cameroon'
,
'africa/middle_africa/cameroon'
),
(
'Canada'
,
'americas/northern_america/canada'
),
(
b
'Canada'
,
'americas/northern_america/canada'
),
(
'Cape Verde'
,
'africa/western_africa/cape_verde'
),
(
b
'Cape Verde'
,
'africa/western_africa/cape_verde'
),
(
'Cayman Islands'
,
'americas/caribbean/cayman_islands'
),
(
b
'Cayman Islands'
,
'americas/caribbean/cayman_islands'
),
(
'Central African Republic'
,
'africa/middle_africa/central_african_republic'
),
(
b
'Central African Republic'
,
'africa/middle_africa/central_african_republic'
),
(
'Chad'
,
'africa/middle_africa/chad'
),
(
b
'Chad'
,
'africa/middle_africa/chad'
),
(
'Channel Islands'
,
'europe/northern_europe/channel_islands'
),
(
b
'Channel Islands'
,
'europe/northern_europe/channel_islands'
),
(
'Chile'
,
'americas/south_america/chile'
),
(
b
'Chile'
,
'americas/south_america/chile'
),
(
'China'
,
'asia/eastern_asia/china'
),
(
b
'China'
,
'asia/eastern_asia/china'
),
(
'Colombia'
,
'americas/south_america/colombia'
),
(
b
'Colombia'
,
'americas/south_america/colombia'
),
(
'Comoros'
,
'africa/eastern_africa/comoros'
),
(
b
'Comoros'
,
'africa/eastern_africa/comoros'
),
(
'Congo'
,
'africa/middle_africa/congo'
),
(
b
'Congo'
,
'africa/middle_africa/congo'
),
(
'Cook Islands'
,
'oceania/polynesia/cook_islands'
),
(
b
'Cook Islands'
,
'oceania/polynesia/cook_islands'
),
(
'Costa Rica'
,
'americas/central_america/costa_rica'
),
(
b
'Costa Rica'
,
'americas/central_america/costa_rica'
),
(
"Cote d'Ivoire"
,
'africa/western_africa/cote_diivoire'
),
(
b
"Cote d'Ivoire"
,
'africa/western_africa/cote_diivoire'
),
(
'Croatia'
,
'europe/southern_europe/croatia'
),
(
b
'Croatia'
,
'europe/southern_europe/croatia'
),
(
'Cuba'
,
'americas/caribbean/cuba'
),
(
b
'Cuba'
,
'americas/caribbean/cuba'
),
(
'Cyprus'
,
'asia/western_asia/cyprus'
),
(
b
'Cyprus'
,
'asia/western_asia/cyprus'
),
(
'Czech Republic'
,
'europe/eastern_europe/czech_republic'
),
(
b
'Czech Republic'
,
'europe/eastern_europe/czech_republic'
),
(
"Democratic People's Republic of Korea"
,
'asia/eastern_asia/democratic_peoples_republic_of_korea'
),
(
b
"Democratic People's Republic of Korea"
,
'asia/eastern_asia/democratic_peoples_republic_of_korea'
),
(
'Democratic Republic of the Congo'
,
'africa/middle_africa/democratic_republic_of_the_congo'
),
(
b
'Democratic Republic of the Congo'
,
'africa/middle_africa/democratic_republic_of_the_congo'
),
(
'Denmark'
,
'europe/northern_europe/denmark'
),
(
b
'Denmark'
,
'europe/northern_europe/denmark'
),
(
'Djibouti'
,
'africa/eastern_africa/djibouti'
),
(
b
'Djibouti'
,
'africa/eastern_africa/djibouti'
),
(
'Dominica'
,
'americas/caribbean/dominica'
),
(
b
'Dominica'
,
'americas/caribbean/dominica'
),
(
'Dominican Republic'
,
'americas/caribbean/dominican_republic'
),
(
b
'Dominican Republic'
,
'americas/caribbean/dominican_republic'
),
(
'Ecuador'
,
'americas/south_america/ecuador'
),
(
b
'Ecuador'
,
'americas/south_america/ecuador'
),
(
'Egypt'
,
'africa/northern_africa/egypt'
),
(
b
'Egypt'
,
'africa/northern_africa/egypt'
),
(
'El Salvador'
,
'americas/central_america/el_salvador'
),
(
b
'El Salvador'
,
'americas/central_america/el_salvador'
),
(
'Equatorial Guinea'
,
'africa/middle_africa/equatorial_guinea'
),
(
b
'Equatorial Guinea'
,
'africa/middle_africa/equatorial_guinea'
),
(
'Eritrea'
,
'africa/eastern_africa/eritrea'
),
(
b
'Eritrea'
,
'africa/eastern_africa/eritrea'
),
(
'Estonia'
,
'europe/northern_europe/estonia'
),
(
b
'Estonia'
,
'europe/northern_europe/estonia'
),
(
'Ethiopia'
,
'africa/eastern_africa/ethiopia'
),
(
b
'Ethiopia'
,
'africa/eastern_africa/ethiopia'
),
(
'Faeroe Islands'
,
'europe/northern_europe/faeroe_islands'
),
(
b
'Faeroe Islands'
,
'europe/northern_europe/faeroe_islands'
),
(
'Falkland Islands (Malvinas)'
,
'americas/south_america/falkland_islands'
),
(
b
'Falkland Islands (Malvinas)'
,
'americas/south_america/falkland_islands'
),
(
'Fiji'
,
'oceania/melanesia/fiji'
),
(
b
'Fiji'
,
'oceania/melanesia/fiji'
),
(
'Finland'
,
'europe/northern_europe/finland'
),
(
b
'Finland'
,
'europe/northern_europe/finland'
),
(
'France'
,
'europe/western_europe/france'
),
(
b
'France'
,
'europe/western_europe/france'
),
(
'French Guiana'
,
'americas/south_america/french_guiana'
),
(
b
'French Guiana'
,
'americas/south_america/french_guiana'
),
(
'French Polynesia'
,
'oceania/polynesia/french_polynesia'
),
(
b
'French Polynesia'
,
'oceania/polynesia/french_polynesia'
),
(
'Gabon'
,
'africa/middle_africa/gabon'
),
(
b
'Gabon'
,
'africa/middle_africa/gabon'
),
(
'Gambia'
,
'africa/western_africa/gambia'
),
(
b
'Gambia'
,
'africa/western_africa/gambia'
),
(
'Georgia'
,
'asia/western_asia/georgia'
),
(
b
'Georgia'
,
'asia/western_asia/georgia'
),
(
'Germany'
,
'europe/western_europe/germany'
),
(
b
'Germany'
,
'europe/western_europe/germany'
),
(
'Ghana'
,
'africa/western_africa/ghana'
),
(
b
'Ghana'
,
'africa/western_africa/ghana'
),
(
'Gibraltar'
,
'europe/southern_europe/gibraltar'
),
(
b
'Gibraltar'
,
'europe/southern_europe/gibraltar'
),
(
'Greece'
,
'europe/southern_europe/greece'
),
(
b
'Greece'
,
'europe/southern_europe/greece'
),
(
'Greenland'
,
'americas/northern_america/greenland'
),
(
b
'Greenland'
,
'americas/northern_america/greenland'
),
(
'Grenada'
,
'americas/caribbean/grenada'
),
(
b
'Grenada'
,
'americas/caribbean/grenada'
),
(
'Guadeloupe'
,
'americas/caribbean/guadeloupe'
),
(
b
'Guadeloupe'
,
'americas/caribbean/guadeloupe'
),
(
'Guam'
,
'oceania/micronesia/guam'
),
(
b
'Guam'
,
'oceania/micronesia/guam'
),
(
'Guatemala'
,
'americas/central_america/guatemala'
),
(
b
'Guatemala'
,
'americas/central_america/guatemala'
),
(
'Guernsey'
,
'europe/northern_europe/guernsey'
),
(
b
'Guernsey'
,
'europe/northern_europe/guernsey'
),
(
'Guinea'
,
'africa/western_africa/guinea'
),
(
b
'Guinea'
,
'africa/western_africa/guinea'
),
(
'Guinea-Bissau'
,
'africa/western_africa/guinea-bissau'
),
(
b
'Guinea-Bissau'
,
'africa/western_africa/guinea-bissau'
),
(
'Guyana'
,
'americas/south_america/guyana'
),
(
b
'Guyana'
,
'americas/south_america/guyana'
),
(
'Haiti'
,
'americas/caribbean/haiti'
),
(
b
'Haiti'
,
'americas/caribbean/haiti'
),
(
'Holy See'
,
'europe/southern_europe/holy_see'
),
(
b
'Holy See'
,
'europe/southern_europe/holy_see'
),
(
'Honduras'
,
'americas/central_america/honduras'
),
(
b
'Honduras'
,
'americas/central_america/honduras'
),
(
'Hong Kong Special Administrative Region of China'
,
'asia/eastern_asia/hong_kong'
),
(
b
'Hong Kong Special Administrative Region of China'
,
'asia/eastern_asia/hong_kong'
),
(
'Hungary'
,
'europe/eastern_europe/hungary'
),
(
b
'Hungary'
,
'europe/eastern_europe/hungary'
),
(
'Iceland'
,
'europe/northern_europe/iceland'
),
(
b
'Iceland'
,
'europe/northern_europe/iceland'
),
(
'India'
,
'asia/southern_asia/india'
),
(
b
'India'
,
'asia/southern_asia/india'
),
(
'Indonesia'
,
'asia/south-eastern_asia/indonesia'
),
(
b
'Indonesia'
,
'asia/south-eastern_asia/indonesia'
),
(
'Iran, Islamic Republic of'
,
'asia/southern_asia/iran'
),
(
b
'Iran, Islamic Republic of'
,
'asia/southern_asia/iran'
),
(
'Iraq'
,
'asia/western_asia/iraq'
),
(
b
'Iraq'
,
'asia/western_asia/iraq'
),
(
'Ireland'
,
'europe/northern_europe/ireland'
),
(
b
'Ireland'
,
'europe/northern_europe/ireland'
),
(
'Isle of Man'
,
'europe/northern_europe/isle_of_man'
),
(
b
'Isle of Man'
,
'europe/northern_europe/isle_of_man'
),
(
'Israel'
,
'asia/western_asia/israel'
),
(
b
'Israel'
,
'asia/western_asia/israel'
),
(
'Italy'
,
'europe/southern_europe/italy'
),
(
b
'Italy'
,
'europe/southern_europe/italy'
),
(
'Jamaica'
,
'americas/caribbean/jamaica'
),
(
b
'Jamaica'
,
'americas/caribbean/jamaica'
),
(
'Japan'
,
'asia/eastern_asia/japan'
),
(
b
'Japan'
,
'asia/eastern_asia/japan'
),
(
'Jersey'
,
'europe/northern_europe/jersey'
),
(
b
'Jersey'
,
'europe/northern_europe/jersey'
),
(
'Jordan'
,
'asia/western_asia/jordan'
),
(
b
'Jordan'
,
'asia/western_asia/jordan'
),
(
'Kazakhstan'
,
'asia/central_asia/kazakhstan'
),
(
b
'Kazakhstan'
,
'asia/central_asia/kazakhstan'
),
(
'Kenya'
,
'africa/eastern_africa/kenya'
),
(
b
'Kenya'
,
'africa/eastern_africa/kenya'
),
(
'Kiribati'
,
'oceania/micronesia/kiribati'
),
(
b
'Kiribati'
,
'oceania/micronesia/kiribati'
),
(
'Kuwait'
,
'asia/western_asia/kuwait'
),
(
b
'Kuwait'
,
'asia/western_asia/kuwait'
),
(
'Kyrgyzstan'
,
'asia/central_asia/kyrgyzstan'
),
(
b
'Kyrgyzstan'
,
'asia/central_asia/kyrgyzstan'
),
(
"Lao People's Democratic Republic"
,
'asia/south-eastern_asia/lao_peoples_democratic_republic'
),
(
b
"Lao People's Democratic Republic"
,
'asia/south-eastern_asia/lao_peoples_democratic_republic'
),
(
'Latvia'
,
'europe/northern_europe/latvia'
),
(
b
'Latvia'
,
'europe/northern_europe/latvia'
),
(
'Lebanon'
,
'asia/western_asia/lebanon'
),
(
b
'Lebanon'
,
'asia/western_asia/lebanon'
),
(
'Lesotho'
,
'africa/southern_africa/lesotho'
),
(
b
'Lesotho'
,
'africa/southern_africa/lesotho'
),
(
'Liberia'
,
'africa/western_africa/liberia'
),
(
b
'Liberia'
,
'africa/western_africa/liberia'
),
(
'Libyan Arab Jamahiriya'
,
'africa/northern_africa/libyan_arab_jamahiriya'
),
(
b
'Libyan Arab Jamahiriya'
,
'africa/northern_africa/libyan_arab_jamahiriya'
),
(
'Liechtenstein'
,
'europe/western_europe/liechtenstein'
),
(
b
'Liechtenstein'
,
'europe/western_europe/liechtenstein'
),
(
'Lithuania'
,
'europe/northern_europe/lithuania'
),
(
b
'Lithuania'
,
'europe/northern_europe/lithuania'
),
(
'Luxembourg'
,
'europe/western_europe/luxembourg'
),
(
b
'Luxembourg'
,
'europe/western_europe/luxembourg'
),
(
'Macao Special Administrative Region of China'
,
'asia/eastern_asia/macao'
),
(
b
'Macao Special Administrative Region of China'
,
'asia/eastern_asia/macao'
),
(
'Madagascar'
,
'africa/eastern_africa/madagascar'
),
(
b
'Madagascar'
,
'africa/eastern_africa/madagascar'
),
(
'Malawi'
,
'africa/eastern_africa/malawi'
),
(
b
'Malawi'
,
'africa/eastern_africa/malawi'
),
(
'Malaysia'
,
'asia/south-eastern_asia/malaysia'
),
(
b
'Malaysia'
,
'asia/south-eastern_asia/malaysia'
),
(
'Maldives'
,
'asia/southern_asia/maldives'
),
(
b
'Maldives'
,
'asia/southern_asia/maldives'
),
(
'Mali'
,
'africa/western_africa/mali'
),
(
b
'Mali'
,
'africa/western_africa/mali'
),
(
'Malta'
,
'europe/southern_europe/malta'
),
(
b
'Malta'
,
'europe/southern_europe/malta'
),
(
'Marshall Islands'
,
'oceania/micronesia/marshall_islands'
),
(
b
'Marshall Islands'
,
'oceania/micronesia/marshall_islands'
),
(
'Martinique'
,
'americas/caribbean/martinique'
),
(
b
'Martinique'
,
'americas/caribbean/martinique'
),
(
'Mauritania'
,
'africa/western_africa/mauritania'
),
(
b
'Mauritania'
,
'africa/western_africa/mauritania'
),
(
'Mauritius'
,
'africa/eastern_africa/mauritius'
),
(
b
'Mauritius'
,
'africa/eastern_africa/mauritius'
),
(
'Mayotte'
,
'africa/eastern_africa/mayotte'
),
(
b
'Mayotte'
,
'africa/eastern_africa/mayotte'
),
(
'Mexico'
,
'americas/central_america/mexico'
),
(
b
'Mexico'
,
'americas/central_america/mexico'
),
(
'Micronesia, Federated States of'
,
'oceania/micronesia/federated_states_of_micronesia'
),
(
b
'Micronesia, Federated States of'
,
'oceania/micronesia/federated_states_of_micronesia'
),
(
'Monaco'
,
'europe/western_europe/monaco'
),
(
b
'Monaco'
,
'europe/western_europe/monaco'
),
(
'Mongolia'
,
'asia/eastern_asia/mongolia'
),
(
b
'Mongolia'
,
'asia/eastern_asia/mongolia'
),
(
'Montenegro'
,
'europe/southern_europe/montenegro'
),
(
b
'Montenegro'
,
'europe/southern_europe/montenegro'
),
(
'Montserrat'
,
'americas/caribbean/montserrat'
),
(
b
'Montserrat'
,
'americas/caribbean/montserrat'
),
(
'Morocco'
,
'africa/northern_africa/morocco'
),
(
b
'Morocco'
,
'africa/northern_africa/morocco'
),
(
'Mozambique'
,
'africa/eastern_africa/mozambique'
),
(
b
'Mozambique'
,
'africa/eastern_africa/mozambique'
),
(
'Myanmar'
,
'asia/south-eastern_asia/myanmar'
),
(
b
'Myanmar'
,
'asia/south-eastern_asia/myanmar'
),
(
'Namibia'
,
'africa/southern_africa/namibia'
),
(
b
'Namibia'
,
'africa/southern_africa/namibia'
),
(
'Nauru'
,
'oceania/micronesia/nauru'
),
(
b
'Nauru'
,
'oceania/micronesia/nauru'
),
(
'Nepal'
,
'asia/southern_asia/nepal'
),
(
b
'Nepal'
,
'asia/southern_asia/nepal'
),
(
'Netherlands'
,
'europe/western_europe/netherlands'
),
(
b
'Netherlands'
,
'europe/western_europe/netherlands'
),
(
'Netherlands Antilles'
,
'americas/caribbean/netherlands_antilles'
),
(
b
'Netherlands Antilles'
,
'americas/caribbean/netherlands_antilles'
),
(
'New Caledonia'
,
'oceania/melanesia/new_caledonia'
),
(
b
'New Caledonia'
,
'oceania/melanesia/new_caledonia'
),
(
'New Zealand'
,
'oceania/australia/new_zealand'
),
(
b
'New Zealand'
,
'oceania/australia/new_zealand'
),
(
'Nicaragua'
,
'americas/central_america/nicaragua'
),
(
b
'Nicaragua'
,
'americas/central_america/nicaragua'
),
(
'Niger'
,
'africa/western_africa/niger'
),
(
b
'Niger'
,
'africa/western_africa/niger'
),
(
'Nigeria'
,
'africa/western_africa/nigeria'
),
(
b
'Nigeria'
,
'africa/western_africa/nigeria'
),
(
'Niue'
,
'oceania/polynesia/niue'
),
(
b
'Niue'
,
'oceania/polynesia/niue'
),
(
'Norfolk Island'
,
'oceania/australia/norfolk_island'
),
(
b
'Norfolk Island'
,
'oceania/australia/norfolk_island'
),
(
'Northern Mariana Islands'
,
'oceania/micronesia/northern_mariana_islands'
),
(
b
'Northern Mariana Islands'
,
'oceania/micronesia/northern_mariana_islands'
),
(
'Norway'
,
'europe/northern_europe/norway'
),
(
b
'Norway'
,
'europe/northern_europe/norway'
),
(
'Occupied Palestinian Territory'
,
'asia/western_asia/occupied_palestinian_territory'
),
(
b
'Occupied Palestinian Territory'
,
'asia/western_asia/occupied_palestinian_territory'
),
(
'Oman'
,
'asia/western_asia/oman'
),
(
b
'Oman'
,
'asia/western_asia/oman'
),
(
'Pakistan'
,
'asia/southern_asia/pakistan'
),
(
b
'Pakistan'
,
'asia/southern_asia/pakistan'
),
(
'Palau'
,
'oceania/micronesia/palau'
),
(
b
'Palau'
,
'oceania/micronesia/palau'
),
(
'Panama'
,
'americas/central_america/panama'
),
(
b
'Panama'
,
'americas/central_america/panama'
),
(
'Papua New Guinea'
,
'oceania/melanesia/papua_new_guinea'
),
(
b
'Papua New Guinea'
,
'oceania/melanesia/papua_new_guinea'
),
(
'Paraguay'
,
'americas/south_america/paraguay'
),
(
b
'Paraguay'
,
'americas/south_america/paraguay'
),
(
'Peru'
,
'americas/south_america/peru'
),
(
b
'Peru'
,
'americas/south_america/peru'
),
(
'Philippines'
,
'asia/south-eastern_asia/philippines'
),
(
b
'Philippines'
,
'asia/south-eastern_asia/philippines'
),
(
'Pitcairn'
,
'oceania/polynesia/pitcairn'
),
(
b
'Pitcairn'
,
'oceania/polynesia/pitcairn'
),
(
'Poland'
,
'europe/eastern_europe/poland'
),
(
b
'Poland'
,
'europe/eastern_europe/poland'
),
(
'Portugal'
,
'europe/southern_europe/portugal'
),
(
b
'Portugal'
,
'europe/southern_europe/portugal'
),
(
'Puerto Rico'
,
'americas/caribbean/puerto_rico'
),
(
b
'Puerto Rico'
,
'americas/caribbean/puerto_rico'
),
(
'Qatar'
,
'asia/western_asia/qatar'
),
(
b
'Qatar'
,
'asia/western_asia/qatar'
),
(
'Republic of Korea'
,
'asia/eastern_asia/republic_of_korea'
),
(
b
'Republic of Korea'
,
'asia/eastern_asia/republic_of_korea'
),
(
'Republic of Moldova'
,
'europe/eastern_europe/republic_of_moldova'
),
(
b
'Republic of Moldova'
,
'europe/eastern_europe/republic_of_moldova'
),
(
'Romania'
,
'europe/eastern_europe/romania'
),
(
b
'Romania'
,
'europe/eastern_europe/romania'
),
(
'Russian Federation'
,
'europe/eastern_europe/russian_federation'
),
(
b
'Russian Federation'
,
'europe/eastern_europe/russian_federation'
),
(
'Rwanda'
,
'africa/eastern_africa/rwanda'
),
(
b
'Rwanda'
,
'africa/eastern_africa/rwanda'
),
(
'R
\
xc3
\
xa9
union'
,
'africa/eastern_africa/reunion'
),
(
b
'R
\
xc3
\
xa9
union'
,
'africa/eastern_africa/reunion'
),
(
'Saint Helena'
,
'africa/western_africa/saint_helena'
),
(
b
'Saint Helena'
,
'africa/western_africa/saint_helena'
),
(
'Saint Kitts and Nevis'
,
'americas/caribbean/saint_kitts_and_nevis'
),
(
b
'Saint Kitts and Nevis'
,
'americas/caribbean/saint_kitts_and_nevis'
),
(
'Saint Lucia'
,
'americas/caribbean/saint_lucia'
),
(
b
'Saint Lucia'
,
'americas/caribbean/saint_lucia'
),
(
'Saint Martin (French part)'
,
'americas/caribbean/saint_martin'
),
(
b
'Saint Martin (French part)'
,
'americas/caribbean/saint_martin'
),
(
'Saint Pierre and Miquelon'
,
'americas/northern_america/saint_pierre_and_miquelon'
),
(
b
'Saint Pierre and Miquelon'
,
'americas/northern_america/saint_pierre_and_miquelon'
),
(
'Saint Vincent and the Grenadines'
,
'americas/caribbean/saint_vincent_and_the_grenadines'
),
(
b
'Saint Vincent and the Grenadines'
,
'americas/caribbean/saint_vincent_and_the_grenadines'
),
(
'Saint-Barth
\
xc3
\
xa9
lemy'
,
'americas/caribbean/saint-barthelemy'
),
(
b
'Saint-Barth
\
xc3
\
xa9
lemy'
,
'americas/caribbean/saint-barthelemy'
),
(
'Samoa'
,
'oceania/polynesia/samoa'
),
(
b
'Samoa'
,
'oceania/polynesia/samoa'
),
(
'San Marino'
,
'europe/southern_europe/san_marino'
),
(
b
'San Marino'
,
'europe/southern_europe/san_marino'
),
(
'Sao Tome and Principe'
,
'africa/middle_africa/sao_tome_and_principe'
),
(
b
'Sao Tome and Principe'
,
'africa/middle_africa/sao_tome_and_principe'
),
(
'Saudi Arabia'
,
'asia/western_asia/saudi_arabia'
),
(
b
'Saudi Arabia'
,
'asia/western_asia/saudi_arabia'
),
(
'Senegal'
,
'africa/western_africa/senegal'
),
(
b
'Senegal'
,
'africa/western_africa/senegal'
),
(
'Serbia'
,
'europe/southern_europe/serbia'
),
(
b
'Serbia'
,
'europe/southern_europe/serbia'
),
(
'Seychelles'
,
'africa/eastern_africa/seychelles'
),
(
b
'Seychelles'
,
'africa/eastern_africa/seychelles'
),
(
'Sierra Leone'
,
'africa/western_africa/sierra_leone'
),
(
b
'Sierra Leone'
,
'africa/western_africa/sierra_leone'
),
(
'Singapore'
,
'asia/south-eastern_asia/singapore'
),
(
b
'Singapore'
,
'asia/south-eastern_asia/singapore'
),
(
'Slovakia'
,
'europe/eastern_europe/slovakia'
),
(
b
'Slovakia'
,
'europe/eastern_europe/slovakia'
),
(
'Slovenia'
,
'europe/southern_europe/slovenia'
),
(
b
'Slovenia'
,
'europe/southern_europe/slovenia'
),
(
'Solomon Islands'
,
'oceania/melanesia/solomon_islands'
),
(
b
'Solomon Islands'
,
'oceania/melanesia/solomon_islands'
),
(
'Somalia'
,
'africa/eastern_africa/somalia'
),
(
b
'Somalia'
,
'africa/eastern_africa/somalia'
),
(
'South Africa'
,
'africa/southern_africa/south_africa'
),
(
b
'South Africa'
,
'africa/southern_africa/south_africa'
),
(
'Spain'
,
'europe/southern_europe/spain'
),
(
b
'Spain'
,
'europe/southern_europe/spain'
),
(
'Sri Lanka'
,
'asia/southern_asia/sri_lanka'
),
(
b
'Sri Lanka'
,
'asia/southern_asia/sri_lanka'
),
(
'Sudan'
,
'africa/northern_africa/sudan'
),
(
b
'Sudan'
,
'africa/northern_africa/sudan'
),
(
'Suriname'
,
'americas/south_america/suriname'
),
(
b
'Suriname'
,
'americas/south_america/suriname'
),
(
'Svalbard and Jan Mayen Islands'
,
'europe/northern_europe/svalbard_and_jan_mayen_islands'
),
(
b
'Svalbard and Jan Mayen Islands'
,
'europe/northern_europe/svalbard_and_jan_mayen_islands'
),
(
'Swaziland'
,
'africa/southern_africa/swaziland'
),
(
b
'Swaziland'
,
'africa/southern_africa/swaziland'
),
(
'Sweden'
,
'europe/northern_europe/sweden'
),
(
b
'Sweden'
,
'europe/northern_europe/sweden'
),
(
'Switzerland'
,
'europe/western_europe/switzerland'
),
(
b
'Switzerland'
,
'europe/western_europe/switzerland'
),
(
'Syrian Arab Republic'
,
'asia/western_asia/syrian_arab_republic'
),
(
b
'Syrian Arab Republic'
,
'asia/western_asia/syrian_arab_republic'
),
(
'Tajikistan'
,
'asia/central_asia/tajikistan'
),
(
b
'Tajikistan'
,
'asia/central_asia/tajikistan'
),
(
'Thailand'
,
'asia/south-eastern_asia/thailand'
),
(
b
'Thailand'
,
'asia/south-eastern_asia/thailand'
),
(
'The former Yugoslav Republic of Macedonia'
,
'europe/southern_europe/macedonia'
),
(
b
'The former Yugoslav Republic of Macedonia'
,
'europe/southern_europe/macedonia'
),
(
'Timor-Leste'
,
'asia/south-eastern_asia/timor-leste'
),
(
b
'Timor-Leste'
,
'asia/south-eastern_asia/timor-leste'
),
(
'Togo'
,
'africa/western_africa/togo'
),
(
b
'Togo'
,
'africa/western_africa/togo'
),
(
'Tokelau'
,
'oceania/polynesia/tokelau'
),
(
b
'Tokelau'
,
'oceania/polynesia/tokelau'
),
(
'Tonga'
,
'oceania/polynesia/tonga'
),
(
b
'Tonga'
,
'oceania/polynesia/tonga'
),
(
'Trinidad and Tobago'
,
'americas/caribbean/trinidad_and_tobago'
),
(
b
'Trinidad and Tobago'
,
'americas/caribbean/trinidad_and_tobago'
),
(
'Tunisia'
,
'africa/northern_africa/tunisia'
),
(
b
'Tunisia'
,
'africa/northern_africa/tunisia'
),
(
'Turkey'
,
'asia/western_asia/turkey'
),
(
b
'Turkey'
,
'asia/western_asia/turkey'
),
(
'Turkmenistan'
,
'asia/central_asia/turkmenistan'
),
(
b
'Turkmenistan'
,
'asia/central_asia/turkmenistan'
),
(
'Turks and Caicos Islands'
,
'americas/caribbean/turks_and_caicos_islands'
),
(
b
'Turks and Caicos Islands'
,
'americas/caribbean/turks_and_caicos_islands'
),
(
'Tuvalu'
,
'oceania/polynesia/tuvalu'
),
(
b
'Tuvalu'
,
'oceania/polynesia/tuvalu'
),
(
'Uganda'
,
'africa/eastern_africa/uganda'
),
(
b
'Uganda'
,
'africa/eastern_africa/uganda'
),
(
'Ukraine'
,
'europe/eastern_europe/ukraine'
),
(
b
'Ukraine'
,
'europe/eastern_europe/ukraine'
),
(
'United Arab Emirates'
,
'asia/western_asia/united_arab_emirates'
),
(
b
'United Arab Emirates'
,
'asia/western_asia/united_arab_emirates'
),
(
'United Kingdom of Great Britain and Northern Ireland'
,
'europe/northern_europe/united_kingdom'
),
(
b
'United Kingdom of Great Britain and Northern Ireland'
,
'europe/northern_europe/united_kingdom'
),
(
'United Republic of Tanzania'
,
'africa/eastern_africa/united_republic_of_tanzania'
),
(
b
'United Republic of Tanzania'
,
'africa/eastern_africa/united_republic_of_tanzania'
),
(
'United States Virgin Islands'
,
'americas/caribbean/united_states_virgin_islands'
),
(
b
'United States Virgin Islands'
,
'americas/caribbean/united_states_virgin_islands'
),
(
'United States of America'
,
'americas/northern_america/united_states_of_america'
),
(
b
'United States of America'
,
'americas/northern_america/united_states_of_america'
),
(
'Uruguay'
,
'americas/south_america/uruguay'
),
(
b
'Uruguay'
,
'americas/south_america/uruguay'
),
(
'Uzbekistan'
,
'asia/central_asia/uzbekistan'
),
(
b
'Uzbekistan'
,
'asia/central_asia/uzbekistan'
),
(
'Vanuatu'
,
'oceania/melanesia/vanuatu'
),
(
b
'Vanuatu'
,
'oceania/melanesia/vanuatu'
),
(
'Venezuela (Bolivarian Republic of)'
,
'americas/south_america/venezuela'
),
(
b
'Venezuela (Bolivarian Republic of)'
,
'americas/south_america/venezuela'
),
(
'Viet Nam'
,
'asia/south-eastern_asia/viet_nam'
),
(
b
'Viet Nam'
,
'asia/south-eastern_asia/viet_nam'
),
(
'Wallis and Futuna Islands'
,
'oceania/polynesia/wallis_and_futuna_islands'
),
(
b
'Wallis and Futuna Islands'
,
'oceania/polynesia/wallis_and_futuna_islands'
),
(
'Western Sahara'
,
'africa/northern_africa/western_sahara'
),
(
b
'Western Sahara'
,
'africa/northern_africa/western_sahara'
),
(
'Yemen'
,
'asia/western_asia/yemen'
),
(
b
'Yemen'
,
'asia/western_asia/yemen'
),
(
'Zambia'
,
'africa/eastern_africa/zambia'
),
(
b
'Zambia'
,
'africa/eastern_africa/zambia'
),
(
'Zimbabwe'
,
'africa/eastern_africa/zimbabwe'
),
(
b
'Zimbabwe'
,
'africa/eastern_africa/zimbabwe'
),
(
'
\
xc3
\
x85
land Islands'
,
'europe/northern_europe/aland_islands'
),
(
b
'
\
xc3
\
x85
land Islands'
,
'europe/northern_europe/aland_islands'
),
]
]
return
[[
''
,
''
]]
+
[[
str
(
translateString
(
title
)),
relative_url
]
for
(
title
,
relative_url
)
in
region_item_list
]
return
[[
''
,
''
]]
+
[[
str
(
translateString
(
title
.
decode
(
'utf-8'
)
)),
relative_url
]
for
(
title
,
relative_url
)
in
region_item_list
]
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testXForwardedFor.py
View file @
735600e2
...
@@ -56,6 +56,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
...
@@ -56,6 +56,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4'
},
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4'
},
timeout
=
5
,
)
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
last_line
=
get_Z2_log_last_line
()
last_line
=
get_Z2_log_last_line
()
...
@@ -63,6 +64,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
...
@@ -63,6 +64,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4, 5.6.7.8'
},
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4, 5.6.7.8'
},
timeout
=
5
,
)
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertNotEqual
(
response
.
text
,
'5.6.7.8'
)
self
.
assertNotEqual
(
response
.
text
,
'5.6.7.8'
)
...
@@ -71,6 +73,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
...
@@ -71,6 +73,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
self
.
assertFalse
(
last_line
.
startswith
(
'5.6.7.8 - '
),
last_line
)
self
.
assertFalse
(
last_line
.
startswith
(
'5.6.7.8 - '
),
last_line
)
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
timeout
=
5
,
)
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
last_line
=
get_Z2_log_last_line
()
last_line
=
get_Z2_log_last_line
()
...
@@ -81,6 +84,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
...
@@ -81,6 +84,7 @@ class TestXForwardedFor(ERP5TypeTestCase):
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4'
},
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4'
},
timeout
=
5
,
)
)
self
.
assertEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertEqual
(
response
.
text
,
'1.2.3.4'
)
last_line
=
get_Z2_log_last_line
()
last_line
=
get_Z2_log_last_line
()
...
@@ -88,12 +92,14 @@ class TestXForwardedFor(ERP5TypeTestCase):
...
@@ -88,12 +92,14 @@ class TestXForwardedFor(ERP5TypeTestCase):
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4, 5.6.7.8'
},
headers
=
{
'X-Forwarded-For'
:
'1.2.3.4, 5.6.7.8'
},
timeout
=
5
,
)
)
self
.
assertEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertEqual
(
response
.
text
,
'1.2.3.4'
)
last_line
=
get_Z2_log_last_line
()
last_line
=
get_Z2_log_last_line
()
self
.
assertTrue
(
last_line
.
startswith
(
'1.2.3.4 - '
),
last_line
)
self
.
assertTrue
(
last_line
.
startswith
(
'1.2.3.4 - '
),
last_line
)
response
=
requests
.
get
(
response
=
requests
.
get
(
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
'%s/%s'
%
(
self
.
portal
.
absolute_url
(),
script_id
),
timeout
=
5
,
)
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
self
.
assertNotEqual
(
response
.
text
,
'1.2.3.4'
)
last_line
=
get_Z2_log_last_line
()
last_line
=
get_Z2_log_last_line
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment