Exemple #1
0
 def test_invalid_token(self, invalid_token):
     with pytest.raises(ValidationError):
         check_token(invalid_token)
Exemple #2
0
 def test_valid(self):
     assert check_token(VALID_TOKEN) is True
Exemple #3
0
def test_invalid_token():
    with pytest.raises(exceptions.ValidationError):
        api.check_token(INVALID_TOKEN)
Exemple #4
0
def test_valid_token():
    assert api.check_token(VALID_TOKEN)
Exemple #5
0
 def valid_api_token(cls, value):
     try:
         check_token(value)
         return value
     except exceptions.ValidationError as e:
         raise ValueError(e)
Exemple #6
0
 def test_invalid_token(self):
     with pytest.raises(ValidationError):
         check_token(INVALID_TOKEN)