FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
validators/tests/test_sha224.py at master · pythonthings/validators · GitHub
pythonthings
validators
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
validators
/
tests
/
test_sha224.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (17 loc) · 698 Bytes
Breadcrumbs
validators
/
tests
/
test_sha224.py
Copy path
File metadata and controls
22 lines (17 loc) · 698 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- coding: utf-8 -*-
import
pytest
import
validators
@
pytest
.
mark
.
parametrize
(
'value'
, [
'd14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f'
,
'D14A028C2A3A2BC9476102BB288234C415A2B01F828EA62AC5B3E42F'
])
def
test_returns_true_on_valid_sha224
(
value
):
assert
validators
.
sha224
(
value
)
@
pytest
.
mark
.
parametrize
(
'value'
, [
'z14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f'
,
'd028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f'
,
'daaa14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f'
])
def
test_returns_failed_validation_on_invalid_sha224
(
value
):
result
=
validators
.
sha224
(
value
)
assert
isinstance
(
result
,
validators
.
ValidationFailure
)
Back
|
FazBrowse Home
|
New Git URL