How to use the tftest.parse_args function in tftest

To help you get started, we’ve selected a few tftest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GoogleCloudPlatform / terraform-python-testing-helper / test / test_args.py View on Github external
def test_args():
  assert tftest.parse_args() == []
  for kwargs, expected in ARGS_TESTS:
    assert tftest.parse_args(**kwargs) == expected
github GoogleCloudPlatform / terraform-python-testing-helper / test / test_args.py View on Github external
def test_targets():
  assert tftest.parse_args(targets=['one', 'two']) == sorted(
      ['-target=one', '-target=two'])
github GoogleCloudPlatform / terraform-python-testing-helper / test / test_args.py View on Github external
def test_var_args():
  assert sorted(tftest.parse_args(init_vars={'a': 1, 'b': '["2"]'})) == sorted(
      ["-backend-config='a=1'", '-backend-config=\'b=["2"]\''])
  assert sorted(tftest.parse_args(tf_vars={'a': 1, 'b': '["2"]'})) == sorted(
      ['-var', 'b=["2"]', '-var', 'a=1'])
github GoogleCloudPlatform / terraform-python-testing-helper / test / test_args.py View on Github external
def test_args():
  assert tftest.parse_args() == []
  for kwargs, expected in ARGS_TESTS:
    assert tftest.parse_args(**kwargs) == expected
github GoogleCloudPlatform / terraform-python-testing-helper / test / test_args.py View on Github external
def test_var_args():
  assert sorted(tftest.parse_args(init_vars={'a': 1, 'b': '["2"]'})) == sorted(
      ["-backend-config='a=1'", '-backend-config=\'b=["2"]\''])
  assert sorted(tftest.parse_args(tf_vars={'a': 1, 'b': '["2"]'})) == sorted(
      ['-var', 'b=["2"]', '-var', 'a=1'])