Fix templates for the new test module naming scheme

This commit is contained in:
Pedro Algarvio 2017-02-18 13:25:57 +00:00
parent 8337a164ee
commit 2a76618b17
No known key found for this signature in database
GPG Key ID: BB36BF6584A298FF
5 changed files with 3 additions and 18 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)