FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
validators/tests/test_uuid.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_uuid.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (16 loc) · 601 Bytes
Breadcrumbs
validators
/
tests
/
test_uuid.py
Copy path
File metadata and controls
21 lines (16 loc) · 601 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
# -*- coding: utf-8 -*-
import
pytest
from
validators
import
uuid
,
ValidationFailure
@
pytest
.
mark
.
parametrize
((
'value'
,), [
(
'2bc1c94f-0deb-43e9-92a1-4775189ec9f8'
,),
])
def
test_returns_true_on_valid_mac_address
(
value
):
assert
uuid
(
value
)
@
pytest
.
mark
.
parametrize
((
'value'
,), [
(
'2bc1c94f-deb-43e9-92a1-4775189ec9f8'
,),
(
'2bc1c94f-0deb-43e9-92a1-4775189ec9f'
,),
(
'gbc1c94f-0deb-43e9-92a1-4775189ec9f8'
,),
(
'2bc1c94f 0deb-43e9-92a1-4775189ec9f8'
,),
])
def
test_returns_failed_validation_on_invalid_mac_address
(
value
):
assert
isinstance
(
uuid
(
value
),
ValidationFailure
)
Back
|
FazBrowse Home
|
New Git URL