{"comment":{"url":"https://api.github.com/repos/azurestandard/api-spec/comments/14198078","html_url":"https://github.com/azurestandard/api-spec/commit/765342885ece4a4c90a2886a03ddc706780680b7#commitcomment-14198078","id":14198078,"user":{"login":"wking","id":209920,"avatar_url":"https://avatars.githubusercontent.com/u/209920?v=3","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"765342885ece4a4c90a2886a03ddc706780680b7","created_at":"2015-11-04T23:00:27Z","updated_at":"2015-11-04T23:00:27Z","body":"The API currently 500s countries besides the US and Canada (where these tests expect a 400).  Even if we 400 them, it's probably still worth testing that Beehive knows them because we use the same country list for product origins (although it may make more sense to move this test to the product API if/when we gain a writable API there).  Anyhow, if I test my local database against this (using 500 instead of 400), I get the following errors:\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [BONAIRE, SINT EUSTATIUS AND SABA (BQ)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [CURAÇAO (CW)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [LIBYA (LY)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 242, in test_country_iso_list\r\n        name, alternate_names.get(country_code, [country]))\r\n    AssertionError: 'LIBYAN ARAB JAMAHIRIYA' not found in ['LIBYA']\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [PALESTINE, STATE OF (PS)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 242, in test_country_iso_list\r\n        name, alternate_names.get(country_code, [country]))\r\n    AssertionError: 'PALESTINIAN TERRITORY, OCCUPIED' not found in ['PALESTINE, STATE OF']\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [SAINT BARTHÉLEMY (BL)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [SAINT MARTIN (FRENCH PART) (MF)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [SINT MAARTEN (DUTCH PART) (SX)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ======================================================================\r\n    FAIL: test_country_iso_list (test.address.TestAddress) [SOUTH SUDAN (SS)]\r\n    ----------------------------------------------------------------------\r\n    Traceback (most recent call last):\r\n      File \"/home/wking/Private/azure/api-spec/test/address.py\", line 230, in test_country_iso_list\r\n        self.assertEqual(cm.exception.code, 500)\r\n    AssertionError: 400 != 500\r\n\r\n    ----------------------------------------------------------------------\r\n    Ran 1 test in 178.553s\r\n\r\n    FAILED (failures=8)\r\n\r\nThe `400 != 500` errors are for new entries that I don't have in my test database.  For example:\r\n\r\n    {\"message\": \"country-name not found: u'SS'\", \"code\": 400}\r\n\r\nPalestine and Libya are probably just official name changes (and I'd suggest we migrate to “Libya”, matching the ISO, and “Palestine”, to stay out of that debate)."}}