示例#1
0
 def test_countries_are_checked_against_static_list(self, country,
                                                    expected):
     response = UserPayload().blend()\
         .set_country(country)\
         .post(code=expected)
     if expected == 422:
         response.assertRaiseJsonApiError('/data/attributes/country')
     else:
         response.assertHasAttribute('country', country)
示例#2
0
 def test_languages_are_checked_against_static_list(self, language,
                                                    expected):
     response = UserPayload().blend()\
         .set_language(language)\
         .post(code=expected)
     if expected == 422:
         response.assertRaiseJsonApiError('/data/attributes/language')
     else:
         response.assertHasAttribute('language', language)