mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 08:35:21 +00:00
Fix templates for the new test module naming scheme
This commit is contained in:
parent
8337a164ee
commit
2a76618b17
@ -29,7 +29,7 @@ Creates a new execution module within salt/modules/{{module_name}}.py
|
||||
module_unit
|
||||
^^^^^^^^^^^
|
||||
|
||||
Creates a new execution module unit test suite within tests/unit/modules/{{module_name}}_test.py
|
||||
Creates a new execution module unit test suite within tests/unit/modules/test_{{module_name}}.py
|
||||
|
||||
state
|
||||
^^^^^
|
||||
@ -39,7 +39,7 @@ Creates a new state module within salt/states/{{module_name}}.py
|
||||
state_unit
|
||||
^^^^^^^^^^
|
||||
|
||||
Creates a new state module unit test suite within tests/unit/states/{{module_name}}_test.py
|
||||
Creates a new state module unit test suite within tests/unit/states/test_{{module_name}}.py
|
||||
|
||||
|
||||
Adding templates
|
||||
@ -103,4 +103,4 @@ salt.utils.extend module
|
||||
========================
|
||||
|
||||
.. automodule:: salt.utils.extend
|
||||
:members:
|
||||
:members:
|
||||
|
@ -14,10 +14,8 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
from salt.modules import {{module_name}}
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
SERVICE_NAME = '{{module_name}}'
|
||||
{{module_name}}.__salt__ = {}
|
||||
@ -39,8 +37,3 @@ class {{module_name|capitalize}}TestCase(ModuleTestCase):
|
||||
def test_behaviour(self):
|
||||
# Test inherent behaviours
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unit import run_tests
|
||||
run_tests({{module_name|capitalize}}TestCase)
|
||||
|
@ -14,11 +14,8 @@ from salttesting.mock import (
|
||||
NO_MOCK,
|
||||
NO_MOCK_REASON
|
||||
)
|
||||
from salttesting.helpers import ensure_in_syspath
|
||||
from salt.states import {{module_name}}
|
||||
|
||||
ensure_in_syspath('../../')
|
||||
|
||||
SERVICE_NAME = '{{module_name}}'
|
||||
{{module_name}}.__salt__ = {}
|
||||
|
||||
@ -39,8 +36,3 @@ class {{module_name|capitalize}}TestCase(ModuleTestCase):
|
||||
def test_behaviour(self):
|
||||
# Test inherent behaviours
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unit import run_tests
|
||||
run_tests({{module_name|capitalize}}TestCase)
|
||||
|
Loading…
Reference in New Issue
Block a user