Skip to content

Test Jinja Error #8

@allamand

Description

@allamand

Hello,

In the https://catalog.workshops.aws/proton/en-US/module-1/services/define-the-service-instance-infrastructure part of test jinja, you don't show the expected results when running the script, and it fails on my side:

python3 -m unittest discover -s .

E
======================================================================
ERROR: test_jinja (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_jinja
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/linuxbrew/.linuxbrew/opt/python@3.10/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/ubuntu/environment/proton/aws-proton-workshop/test_jinja.py", line 13, in <module>
    class TestJinja(unittest.TestCase):
  File "/home/ubuntu/environment/proton/aws-proton-workshop/test_jinja.py", line 21, in TestJinja
    conf = YamlLintConfig('{\
  File "/home/ubuntu/environment/proton/aws-proton-workshop/venv/lib/python3.10/site-packages/yamllint/config.py", line 45, in __init__
    self.validate()
  File "/home/ubuntu/environment/proton/aws-proton-workshop/venv/lib/python3.10/site-packages/yamllint/config.py", line 148, in validate
    self.rules[id] = validate_rule_conf(rule, self.rules[id])
  File "/home/ubuntu/environment/proton/aws-proton-workshop/venv/lib/python3.10/site-packages/yamllint/config.py", line 189, in validate_rule_conf
    raise YamlLintConfigError(
yamllint.config.YamlLintConfigError: invalid config: option "spaces" of "indentation" should be in (<class 'int'>, 'consistent')


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions