2017-03-22 13:46:39 +01:00
|
|
|
import uuid
|
|
|
|
|
2017-06-23 00:47:35 +02:00
|
|
|
from stix2 import utils
|
|
|
|
|
2017-03-22 13:46:39 +01:00
|
|
|
from .constants import FAKE_TIME
|
|
|
|
|
|
|
|
|
2017-04-07 22:36:42 +02:00
|
|
|
def test_clock(clock):
|
2017-06-23 00:47:35 +02:00
|
|
|
assert utils.STIXdatetime.now() == FAKE_TIME
|
2017-03-22 13:46:39 +01:00
|
|
|
|
|
|
|
|
2017-04-07 22:36:42 +02:00
|
|
|
def test_my_uuid4_fixture(uuid4):
|
2018-06-27 18:34:49 +02:00
|
|
|
assert uuid.uuid4() == "00000000-0000-4000-8000-000000000001"
|
|
|
|
assert uuid.uuid4() == "00000000-0000-4000-8000-000000000002"
|
|
|
|
assert uuid.uuid4() == "00000000-0000-4000-8000-000000000003"
|
2017-03-22 13:46:39 +01:00
|
|
|
for _ in range(256):
|
|
|
|
uuid.uuid4()
|
2018-06-27 18:34:49 +02:00
|
|
|
assert uuid.uuid4() == "00000000-0000-4000-8000-000000000104"
|