Пример #1
0
 def test_check_google_api_key_with_no_setting(self):
     del settings.GOOGLE_API_KEY
     errors = check_google_api_key(None)
     self.assertEqual(errors[0], GOOGLE_API_KEYS_ERRORS["empty"])
Пример #2
0
 def test_check_google_api_key_with_too_short_setting(self):
     errors = check_google_api_key(None)
     self.assertEqual(errors[0], GOOGLE_API_KEYS_ERRORS["length"])
Пример #3
0
 def test_check_google_api_key_with_wrong_type_setting(self):
     errors = check_google_api_key(None)
     self.assertEqual(errors[0], GOOGLE_API_KEYS_ERRORS["type"])
Пример #4
0
 def test_check_google_api_key_with_accurate_setting(self):
     errors = check_google_api_key(None)
     self.assertEqual(errors, [])