2024-11-23 11:48:28 -06:00
|
|
|
# -*- coding: utf-8; -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
from unittest import TestCase
|
|
|
|
from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
from wuttjamaican.cli import make_uuid as mod
|
|
|
|
|
|
|
|
|
|
|
|
here = os.path.dirname(__file__)
|
2025-08-30 21:25:44 -05:00
|
|
|
example_conf = os.path.join(here, "example.conf")
|
2024-11-23 11:48:28 -06:00
|
|
|
|
|
|
|
|
|
|
|
class TestMakeUuid(TestCase):
|
|
|
|
|
|
|
|
def test_basic(self):
|
2025-08-30 21:25:44 -05:00
|
|
|
ctx = MagicMock(params={"config_paths": [example_conf]})
|
|
|
|
with patch.object(mod, "sys") as sys:
|
2024-11-23 11:48:28 -06:00
|
|
|
mod.make_uuid(ctx)
|
|
|
|
sys.stdout.write.assert_called_once()
|