示例#1
0
 def validate_public_key(self, value):
     try:
         decode_key(value)
     except ValueError:
         raise ValidationError(
             'public key must be 64 hex characters.') from None
     return value
示例#2
0
 def test_get_key(self, api_client):
     response = api_client.get(self.path)
     assert response.status_code == status.HTTP_200_OK
     decode_key(response.data['public_key'])
示例#3
0
文件: api.py 项目: Qabel/qabel-index
 def test_get_key(self, api_client):
     response = api_client.get(self.path)
     assert response.status_code == status.HTTP_200_OK
     decode_key(response.data['public_key'])