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
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'])
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'])