mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
This is an exceedingly rough sketch of what attributes might look like - metaclass implementations NOT complete.
This commit is contained in:
2
test/v2/playbook/__init__.py
Normal file
2
test/v2/playbook/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# TODO: header
|
||||
|
||||
37
test/v2/playbook/task.py
Normal file
37
test/v2/playbook/task.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# TODO: header
|
||||
|
||||
from ansible.playbook.task import Task
|
||||
import unittest
|
||||
|
||||
basic_shell_task = dict(
|
||||
name = 'Test Task',
|
||||
shell = 'echo hi'
|
||||
)
|
||||
|
||||
class TestTask(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_can_construct_empty_task():
|
||||
t = Task()
|
||||
|
||||
def test_can_construct_task_with_role():
|
||||
pass
|
||||
|
||||
def test_can_construct_task_with_block():
|
||||
pass
|
||||
|
||||
def test_can_construct_task_with_role_and_block():
|
||||
pass
|
||||
|
||||
def test_can_load_simple_task():
|
||||
t = Task.load(basic_shell_task)
|
||||
assert t.name == basic_shell_task['name']
|
||||
assert t.module == 'shell'
|
||||
assert t.args == 'echo hi'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user